资源算法pytorch_resnet_cifar10

pytorch_resnet_cifar10

2020-02-06 | |  33 |   0 |   0

Proper ResNet Implementation for CIFAR10/CIFAR100 in pytorch

Torchvision model zoo provides number of implementations of various state-of-the-art architectures, however, most of them are defined and implemented for ImageNet. Usually it is very straightforward to use them on other datasets, but sometimes these models need manual setup.

Unfortunately, none of the pytorch repositories with ResNets on CIFAR10 provides an implementation as described in the original paper. If you just use the torchvision's models on CIFAR10 you'll get the model that differs in number of layers and parameters. This is unacceptable if you want to directly compare ResNet-s on CIFAR10 with the original paper. The purpose of this repo is to provide a valid pytorch implementation of ResNet-s for CIFAR10 as described in the original paper. Following models are provided:

Name# layers# paramsTest err(paper)Test err(this impl.)
ResNet20200.27M8.75%8.27%
ResNet32320.46M7.51%7.37%
ResNet44440.66M7.17%6.90%
ResNet56560.85M6.97%6.61%
ResNet1101101.7M6.43%6.32%
ResNet1202120219.4M7.93%6.18%

The implementation matches description of the original paper, with comparable or better test error.

How to run?

git clone https://github.com/akamaster/pytorch_resnet_cifar10cd pytorch_resnet_cifar10
chmod +x run.sh && ./run.sh

Details of training

This implementation follows the paper in straightforward manner with some caveats: First, training in the paper uses 45k/5k train/validation split on the train data, and selects the best performing model based on the performance on the validation set. This implementation does not do any validation testing, so if you need to compare your results on ResNet head-to-head to the orginal paper keep this in mind. Second, if you want to train ResNet1202 keep in mind that you need 16GB memory on GPU.

Pretrained models for download

  1. ResNet20, 8.27% err

  2. ResNet32, 7.37% err

  3. ResNet44, 6.90% err

  4. ResNet56, 6.61% err

  5. ResNet110, 6.32% err

  6. ResNet1202, 6.18% err

If you find this implementation useful and using it in your production/academic work please cite/mention this page and the author Yerlan Idelbayev.


上一篇:cifar10-tensorflow

下一篇:resnet-cifar10-caffe

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...