
DeepMosaic
Image classification69 ops11.7M params
ResNet-18, an 18-layer residual network with identity shortcut connections.
Image classification · 69 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
torchvision.models.resnet18(weights=None)
This model is ResNet-18, the 18-layer network from the paper "Deep Residual Learning for Image Recognition", in the torchvision implementation. The paper starts from what it calls the degradation problem: as plain networks get deeper, accuracy saturates and then degrades rapidly, and the cause is not overfitting.
Its answer is to let each few stacked layers fit a residual mapping instead of the desired mapping directly, and to add the input back through a shortcut connection that skips those layers. The shortcuts simply perform identity mapping, so they add neither extra parameters nor computational complexity. In the paper's 18-layer network a shortcut is added to each pair of 3×3 filters, downsampling is done by convolutional layers with a stride of 2, and the network ends with a global average pooling layer and a 1000-way fully-connected layer.
At this depth the paper finds the residual form mostly helps optimization: the 18-layer plain and residual nets are comparably accurate, but the ResNet converges faster. The paper reports that an ensemble of its residual nets achieved 3.57% error on the ImageNet test set, a result that won 1st place in the ILSVRC 2015 classification task.
Key idea. The paper reformulates stacked layers to learn residual functions with reference to their inputs, which makes substantially deeper networks easier to optimize.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{he2015deepresiduallearningimage,
title={Deep Residual Learning for Image Recognition},
author={Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun},
year={2015},
eprint={1512.03385},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1512.03385},
}