You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains the description and run instructions for the MNIST example Python programs that utilize PnetCDF for file I/O and parallel training with MNIST data.
4
+
5
+
## Directory Structure
6
+
7
+
-**MNIST_data**: This folder contains a mini MNIST test dataset stored in a NetCDF file (`mnist_images_mini.nc`). The file includes:
8
+
- 60 training samples
9
+
- 12 testing samples
10
+
11
+
-**MNIST_codes**: This folder contains the example MNIST training code. The example code is based on the [PyTorch MNIST example](https://github.com/pytorch/examples/tree/main/mnist) and uses `DistributedDataParallel` for parallel training.
12
+
13
+
## Running the MNIST Example Program
14
+
15
+
To run the MNIST example program, use the `mpiexec` command. The example below runs the program on 4 MPI processes.
16
+
17
+
### Command:
18
+
19
+
```sh
20
+
mpiexec -n 4 python main.py
21
+
```
22
+
23
+
### Expected Output:
24
+
25
+
When using 4 MPI processes, the output is expected to be similar to the following:
0 commit comments