Keras Customizable Residual Unit
This building block shows you how to easily incorporate custom residual connections into your Keras neural networks. I spent longer than I'd have liked trying to add these kind of blocks to my models and thought I'd share it with the world.
python residual.py to get a model built and a png to peruse.
This is a simplified implementation of the basic (no bottlenecks) full pre-activation residual unit from He, K., Zhang, X., Ren, S., Sun, J., Identity Mappings in Deep Residual Networks.
Visit the reference implementation at keras-resnet to see a full model with bottlenecks and downsampling between units included.