This code is based on apex's ImageNet example and CutMix's official code.
This code was tested on the following versions, but they may not be necessary.
torch>=1.3.0
torchvision>=0.4.2
tensorboard>=2.0.1
apex>=0.1
Here we show an example of training ResNet-50 with MoEx using PONO to extract the moments.
The exchange probability
bash run_moex_resnet.sh
where $DATA
is the path to the ImageNet data folder, $SAVE
is path to save the model, $NPUS
is the number of GPUs to use, and $WORKERS_PER_GPU
is the number of workers to pre-process the data for each GPU. Please adjust the batch size according to your GPU memory. For example, you may use -b 128
or -b 64
. The learning rate is adjusted based on the batch size.
bash run_moex+cutmix_resnet.sh
bash run_moex_densenet.sh
name | Error Rate | url | |
---|---|---|---|
0 | Moex+cutmix_resnet50 | 20.9 | download |
1 | Moex_densenet265 | 20.9 | download |