PyTorch implementation of image classification models for CIFAR-10/CIFAR-100/MNIST/FashionMNIST/Kuzushiji-MNIST/ImageNet
PyTorch implementation of image classification models for CIFAR-10/CIFAR-100/MNIST/FashionMNIST/Kuzushiji-MNIST/ImageNet
Following papers are implemented using PyTorch.
pip install -r requirements.txtpython train.py --config configs/cifar/resnet_preact.yaml| Model | Test Error (median of 3 runs) | Test Error (in paper) | Training Time |
|---|---|---|---|
| VGG-like (depth 15, w/ BN, channel 64) | 7.29 | N/A | 1h20m |
| ResNet-110 | 6.52 | 6.43 (best), 6.61 +/- 0.16 | 3h06m |
| ResNet-preact-110 | 6.47 | 6.37 (median of 5 runs) | 3h05m |
| ResNet-preact-164 bottleneck | 5.90 | 5.46 (median of 5 runs) | 4h01m |
| ResNet-preact-1001 bottleneck | 4.62 (median of 5 runs), 4.69 +/- 0.20 | ||
| WRN-28-10 | 4.03 | 4.00 (median of 5 runs) | 16h10m |
| WRN-28-10 w/ dropout | 3.89 (median of 5 runs) | ||
| DenseNet-100 (k=12) | 3.87 (1 run) | 4.10 (1 run) | 24h28m* |
| DenseNet-100 (k=24) | 3.74 (1 run) | ||
| DenseNet-BC-100 (k=12) | 4.69 | 4.51 (1 run) | 15h20m |
| DenseNet-BC-250 (k=24) | 3.62 (1 run) | ||
| DenseNet-BC-190 (k=40) | 3.46 (1 run) | ||
| PyramidNet-110 (alpha=84) | 4.40 | 4.26 +/- 0.23 | 11h40m |
| PyramidNet-110 (alpha=270) | 3.92 (1 run) | 3.73 +/- 0.04 | 24h12m* |
| PyramidNet-164 bottleneck (alpha=270) | 3.44 (1 run) | 3.48 +/- 0.20 | 32h37m* |
| PyramidNet-272 bottleneck (alpha=200) | 3.31 +/- 0.08 | ||
| ResNeXt-29 4x64d | 3.89 | ~3.75 (from Figure 7) | 31h17m |
| ResNeXt-29 8x64d | 3.97 (1 run) | 3.65 (average of 10 runs) | 42h50m* |
| ResNeXt-29 16x64d | 3.58 (average of 10 runs) | ||
| shake-shake-26 2x32d (S-S-I) | 3.68 | 3.55 (average of 3 runs) | 33h49m |
| shake-shake-26 2x64d (S-S-I) | 2.88 (1 run) | 2.98 (average of 3 runs) | 78h48m |
| shake-shake-26 2x96d (S-S-I) | 2.90 (1 run) | 2.86 (average of 5 runs) | 101h32m* |
python train.py --config configs/cifar/vgg.yamlpython train.py --config configs/cifar/resnet.yamlpython train.py --config configs/cifar/resnet_preact.yaml \
train.output_dir experiments/resnet_preact_basic_110/exp00python train.py --config configs/cifar/resnet_preact.yaml \
model.resnet_preact.depth 164 \
model.resnet_preact.block_type bottleneck \
train.output_dir experiments/resnet_preact_bottleneck_164/exp00python train.py --config configs/cifar/wrn.yamlpython train.py --config configs/cifar/densenet.yamlpython train.py --config configs/cifar/pyramidnet.yaml \
model.pyramidnet.depth 110 \
model.pyramidnet.block_type basic \
model.pyramidnet.alpha 84 \
train.output_dir experiments/pyramidnet_basic_110_84/exp00python train.py --config configs/cifar/pyramidnet.yaml \
model.pyramidnet.depth 110 \
model.pyramidnet.block_type basic \
model.pyramidnet.alpha 270 \
train.output_dir experiments/pyramidnet_basic_110_270/exp00python train.py --config configs/cifar/resnext.yaml \
model.resnext.cardinality 4 \
train.batch_size 32 \
train.base_lr 0.025 \
train.output_dir experiments/resnext_29_4x64d/exp00python train.py --config configs/cifar/resnext.yaml \
train.batch_size 64 \
train.base_lr 0.05 \
train.output_dir experiments/resnext_29_8x64d/exp00python train.py --config configs/cifar/shake_shake.yaml \
model.shake_shake.initial_channels 32 \
train.output_dir experiments/shake_shake_26_2x32d_SSI/exp00python train.py --config configs/cifar/shake_shake.yaml \
model.shake_shake.initial_channels 64 \
train.batch_size 64 \
train.base_lr 0.1 \
train.output_dir experiments/shake_shake_26_2x64d_SSI/exp00python train.py --config configs/cifar/shake_shake.yaml \
model.shake_shake.initial_channels 96 \
train.batch_size 64 \
train.base_lr 0.1 \
train.output_dir experiments/shake_shake_26_2x96d_SSI/exp00| Model | Test Error (1 run) | # of Epochs | Training Time |
|---|---|---|---|
| ResNet-preact-20, widening factor 4 | 4.91 | 200 | 1h26m |
| ResNet-preact-20, widening factor 4 | 4.01 | 400 | 2h53m |
| ResNet-preact-20, widening factor 4 | 3.99 | 1800 | 12h53m |
| ResNet-preact-20, widening factor 4, Cutout 16 | 3.71 | 200 | 1h26m |
| ResNet-preact-20, widening factor 4, Cutout 16 | 3.46 | 400 | 2h53m |
| ResNet-preact-20, widening factor 4, Cutout 16 | 3.76 | 1800 | 12h53m |
| ResNet-preact-20, widening factor 4, RICAP (beta=0.3) | 3.45 | 200 | 1h26m |
| ResNet-preact-20, widening factor 4, RICAP (beta=0.3) | 3.11 | 400 | 2h53m |
| ResNet-preact-20, widening factor 4, RICAP (beta=0.3) | 3.15 | 1800 | 12h53m |
| Model | Test Error (1 run) | # of Epochs | Training Time |
|---|---|---|---|
| WRN-28-10, Cutout 16 | 3.19 | 200 | 6h35m |
| WRN-28-10, mixup (alpha=1) | 3.32 | 200 | 6h35m |
| WRN-28-10, RICAP (beta=0.3) | 2.83 | 200 | 6h35m |
| WRN-28-10, Dual-Cutout (alpha=0.1) | 2.87 | 200 | 12h42m |
| WRN-28-10, Cutout 16 | 3.07 | 400 | 13h10m |
| WRN-28-10, mixup (alpha=1) | 3.04 | 400 | 13h08m |
| WRN-28-10, RICAP (beta=0.3) | 2.71 | 400 | 13h08m |
| WRN-28-10, Dual-Cutout (alpha=0.1) | 2.76 | 400 | 25h20m |
| shake-shake-26 2x64d, Cutout 16 | 2.64 | 1800 | 78h55m* |
| shake-shake-26 2x64d, mixup (alpha=1) | 2.63 | 1800 | 35h56m |
| shake-shake-26 2x64d, RICAP (beta=0.3) | 2.29 | 1800 | 35h10m |
| shake-shake-26 2x64d, Dual-Cutout (alpha=0.1) | 2.64 | 1800 | 68h34m |
| shake-shake-26 2x96d, Cutout 16 | 2.50 | 1800 | 60h20m |
| shake-shake-26 2x96d, mixup (alpha=1) | 2.36 | 1800 | 60h20m |
| shake-shake-26 2x96d, RICAP (beta=0.3) | 2.10 | 1800 | 60h20m |
| shake-shake-26 2x96d, Dual-Cutout (alpha=0.1) | 2.41 | 1800 | 113h09m |
| shake-shake-26 2x128d, Cutout 16 | 2.58 | 1800 | 85h04m |
| shake-shake-26 2x128d, RICAP (beta=0.3) | 1.97 | 1800 | 85h06m |
python train.py --config configs/cifar/wrn.yaml \
train.batch_size 64 \
train.output_dir experiments/wrn_28_10_cutout16 \
scheduler.type cosine \
augmentation.use_cutout Truepython train.py --config configs/cifar/shake_shake.yaml \
model.shake_shake.initial_channels 64 \
train.batch_size 64 \
train.base_lr 0.1 \
scheduler.epochs 300 \
train.output_dir experiments/shake_shake_26_2x64d_SSI_cutout16/exp00 \
augmentation.use_cutout True| Model | batch size | #GPUs | Test Error (1 run) | # of Epochs | Training Time* |
|---|---|---|---|---|---|
| WRN-28-10, RICAP (beta=0.3) | 512 | 1 | 2.63 | 200 |
No open issues yet, or sync has not completed.