A simple python script to generate Caffe prototxt of pre-activation ResNet on the ImageNet (ILSVRC) dataset. See Identity Mappings in Deep Residual Networks and fb's torch implementation.
- Set the
CAFFE_ROOT
(line 8) properly. python2 net_def.py --depth 200
Depth can be 50, 101, 152, or 200. Will output resnet{depth}_trainval.txt
respectively by default.
-
The script only serves as a network scaffold. More data augmentation schemes should be added to the data layers to achieve good performance.
-
Some pre-activation BatchNorm layers could be further made inplace to save memory. Will double check the correctness of doing so.