← all repositories
raghakot/keras-resnet

ResNet in Keras 1.0: a museum piece with honest footnotes

A clean, pre-keras-2 implementation of residual networks that openly admits where its CIFAR-10 example falls short.

1.4k stars Python ML FrameworksComputer Vision
keras-resnet
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does

Implements ResNet using Keras 1.0’s functional API, supporting both Theano and TensorFlow backends with ’th’ and ’tf’ image dimension ordering. Includes a ResNetBuilder factory for standard architectures and a generic build method for custom setups. Ships with a CIFAR-10 training example.

The interesting bit

The author implements the improved residual block design from the 2016 “Identity Mappings” paper rather than the original 2015 version — a small but meaningful fidelity that many early implementations skipped. The README also contains a refreshingly candid admission that its ResNet18 CIFAR-10 example (~86% accuracy) is architecturally mismatched for the dataset, pointing readers to a better modified approach.

Key highlights

  • Bottleneck and basic residual blocks, switchable by passing a different block function
  • _shortcut handles dimension mismatches with 1×1 convolutions when needed, identity mapping otherwise
  • ResNetBuilder auto-calculates paddings and final pooling filters for custom input shapes
  • Stride handling follows the paper’s nuance: first block uses (1,1), subsequent blocks use (2,2)
  • ~1.4k stars suggests it was a popular reference during the Keras 1.x era

Caveats

  • Frozen in time: targets Keras 1.0, which predates major API changes; likely needs porting for modern use
  • The CIFAR-10 example’s accuracy ceiling is acknowledged as a structural limitation, not a training issue
  • No indication of maintenance status; Travis CI badge suggests older tooling

Verdict

Worth studying if you’re implementing ResNet from scratch and want a readable, paper-faithful reference. Skip if you need production-ready, modern Keras — use keras.applications or torchvision instead.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.