/TF2CIFAR10

95.7% on CIFAR10 with TensorFlow2

Primary LanguagePythonMIT LicenseMIT

TF2CIFAR10

Introduction

I trained CIFAR10 dataset with TensorFlow2, it is very easy to build the project environment by using TensorFlow2's docker container. You can download it form here .

If you find this project useful and using it in your work please cite this implementation, thanks.

Requirements

  • TensorFlow2.0
  • Python3
  • opencv-python
  • tqdm

Accuracy

Model Acc
Resnet56 94.0%
Resnet110 94.6%
Resnet164 94.6%
MobileNetV2 94.3%
DPN92 95.7%

Usage

  1. Download CIFAR10 dataset in Google Drive or Baidu Yun 85r9 and unzip it. Then, put them under directory
    ./cifar/original
    
  2. Convert CIFAR10 dataset by run parse.py
    python3 ./dataset/parse.py
    
  3. Train the model using tain.py, you need to modify train.py to choose a net you want to train.
    python3 train.py
    

Details of training

  • optimizer:SGD
  • lr:1e-1
  • lr range:[(150, 1e-2), (250, 1e-3), (350, 1e-4)]
  • weight decay:5e-4
  • label smoothing:2e-1

Please read the config.py for more details.

Pretrained models for download

You can test the accuracy of CIFAR10 by my models.

Model Link
Resnet56 Google Drive Baidu Yun 477p
Resnet110 Google Drive Baidu Yun exus
Resnet164 Google Drive Baidu Yun hy37
MobileNetV2 Google Drive Baidu Yun 1pnj
DPN92 Google Drive Baidu Yun 9ruw

Reference

Keras-DualPathNetworks

pytorch-cifar

Trains a ResNet on the CIFAR10 dataset