CIFAR10 Example with IgniteIn this example, we show how to use _Ignite_ to train a neural network:on 1 or more GPUs or TPUs compute training/validation metrics log learning rate, metrics etc save the best model weightsConfigurations:[x] single GPU [x] multi GPUs on a single node [x] multi GPUs on multiple nodes [x] TPUs on ColabRequirements:pytorch-ignite: pip install pytorch-ignite torchvision: pip…
Source code on GitHub.
In this example, we show how to use _Ignite_ to train a neural network:
Configurations:
pip install pytorch-ignitepip install torchvisionpip install tqdmpip install tensorboardXpip install firepip install clearmlAlternatively, install the all requirements using pip install -r requirements.txt.
Run the example on a single GPU:
``bash
python main.py run
`
For details on accepted arguments:
`bash
python main.py run -- --help
`
If user would like to provide already downloaded dataset, the path can be setup in parameters as
`bash
--data_path="/path/to/cifar10/"
`
#### Single node, multiple GPUs
Let's start training on a single node with 2 gpus:
`bash
`using torch.distributed.launch
python -u -m torch.distributed.launch --nproc_per_node=2 --use_env main.py run --backend="nccl"
or
`bash
`using function spawn inside the code
python -u main.py run --backend="nccl" --nproc_per_node=2
##### Using Horovod as distributed backend
Please, make sure to have Horovod installed before running.
Let's start training on a single node with 2 gpus:
`bash
`horovodrun
horovodrun -np=2 python -u main.py run --backend="horovod"
or
`bash
`using function spawn inside the code
python -u main.py run --backend="horovod" --nproc_per_node=2
#### Colab, on 8 TPUs
Same code can be run on TPUs: 
#### Multiple nodes, m...