Residual networks implementation using Keras-1.0 functional API
OTHER License
Residual networks implementation using Keras-1.0 functional API, that works with both theano/tensorflow backend and 'th'/'tf' image dim ordering.
The residual blocks are based on the new improved scheme proposed in Identity Mappings in Deep Residual Networks as shown in figure (b)
Both bottleneck and basic residual blocks are supported. To switch them, simply provide the block function here
The architecture is based on 50 layer sample (snippet from paper)
There are two key aspects to note here
_shortcut
by using conv 1X1
with an appropriate stride.Includes cifar10 training example. Achieves ~86% accuracy using Resnet18 model.
Note that ResNet18 as implemented doesn't really seem appropriate for CIFAR-10 as the last two residual stages end up as all 1x1 convolutions from downsampling (stride). This is worse for deeper versions. A smaller, modified ResNet-like architecture achieves ~92% accuracy (see gist).