DuFanXin / resnet-cifar10-caffe

ResNet 20 32 44 56 110 for CIFAR10 with caffe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ResNet 20/32/44/56/110 for CIFAR10 with caffe

  1. create 4 pixel padded training LMDB and testing LMDB, then create a soft link ln -s cifar-10-batches-py in this folder.
    • directly download it here.
    • or you can generate it as follow:
      • get cifar10 python version
      • use data_utils.py to generate 4 pixel padded training data and testing data. Horizontal flip and random crop are performed on the fly while training.
  2. use net_generator.py to generate solver.prototxt and trainval.prototxt, you can generate resnet or plain net of depth 20/32/44/56/110, or even deeper if you want. you just need to change n according to depth=6n+2
  3. specify caffe path in train.sh, then train networks with ./train.sh [GPUs] [NET] (eg., ./train.sh 0,1,2,3 resnet-20, logs can be accessed from resnet-20/logs folder).
  4. specify caffe path in cfgs.py and use plot.py to generate beautful loss plots.

Download

ResNet-56 Accuracy 92.8%

results are consistent with original paper

seems there's no much difference between resnet-20 and plain-20. However, from the second plot, you can see that plain-110 have difficulty to converge. a b

Other models in Caffe

ResNet-ImageNet-Caffe
Xception-Caffe

About

ResNet 20 32 44 56 110 for CIFAR10 with caffe

License:MIT License


Languages

Language:Python 97.5%Language:Shell 2.5%