Skip to content

Latest commit

 

History

History

ImageNet

MoEx on ImageNet

This code is based on apex's ImageNet example and CutMix's official code.

Requirements

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

Training a ResNet-50 with MoEx

Here we show an example of training ResNet-50 with MoEx using PONO to extract the moments. The exchange probability $p$ is set to 1 and the interpolation weight $\lambda$ is set to 0.9.

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.

Training a ResNet-50 with CutMix + MoEx

bash run_moex+cutmix_resnet.sh

Training a DenseNet-265 with MoEx

bash run_moex_densenet.sh

Model Zoo

name Error Rate url
0 Moex+cutmix_resnet50 20.9 download
1 Moex_densenet265 20.9 download