ResNet in TensorFlow
Implemenation of Deep Residual Learning for Image Recognition. Includes a tool to use He et al's published trained Caffe weights in TensorFlow.
MIT license. Contributions welcome.
Be able to use the pre-trained model's that Kaiming He has provided for Caffe. The
convert.pywill convert the weights for use with TensorFlow.
Implemented in the style of Inception not using any classes and making heavy use of variable scope. It should be easily usable in other models.
ResNet is fully convolutional and the implementation should allow inputs to be any size.
Be able to train out of the box on CIFAR-10, 100, and ImageNet. (Implementation incomplete)
To convert the published Caffe pretrained model, run
Caffe is annoying to install so I'm providing a download of the output of
This code depends on TensorFlow git commit cf7ce8 or later because ResNet needs 1x1 convolutions with stride 2. TF 0.8 is not new enough.
convert.pyscript checks that activations are similiar to the caffe version but it's not exactly the same. This is probably due to differences between how TF and Caffe handle padding. Also preprocessing is done with color-channel means instead of pixel-wise means.