
brainscore_resnet50
Image classification175 ops25.6M params
The 50-layer residual network with bottleneck blocks, traced here as torchvision's V1.5 build.
Image classification · 175 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.resnet50(weights=None)
ResNet-50 is the 50-layer member of the residual network family, the architecture that made very deep convolutional networks practical to train. The problem it solves is the degradation problem: once deeper plain networks start converging, accuracy saturates and then rapidly gets worse, and the extra layers raise training error rather than overfitting. The fix is to let each stack of layers learn a residual function F(x) = H(x) - x instead of the full mapping H(x), so the block computes F(x) + x. The intuition is that if an identity mapping were optimal, pushing a residual to zero is easier than fitting an identity through a stack of nonlinear layers. In practice this is a shortcut connection that skips layers and performs an identity mapping, adding neither parameters nor computation.
The 50-layer version replaces the two-layer blocks of ResNet-34 with a three-layer bottleneck block: a 1x1 convolution reduces the channel count, a 3x3 convolution works at the reduced width, and a second 1x1 restores it. The paper notes that identity shortcuts matter especially here, because projecting across the wide ends of each block would double time complexity and model size. ResNet-50 uses projection shortcuts only where dimensions increase (the paper's option B) and runs at 3.8 billion FLOPs. Batch normalization sits right after each convolution and before the activation. The torchvision build traced here is the V1.5 variant, which moves the downsampling stride from the block's first 1x1 convolution to its 3x3 convolution. It was built with no pretrained weights, so the graph shows the architecture alone.
The 50-, 101- and 152-layer ResNets beat the 34-layer models by considerable margins, with no sign of the degradation problem. An ensemble of residual nets reached 3.57% top-5 error on the ImageNet test set and won first place in the ILSVRC 2015 classification task. Even the 152-layer ResNet, at 11.3 billion FLOPs, has lower complexity than VGG-16 and VGG-19. Deep residual representations swapped in for VGG-16 in a Faster R-CNN detector gave a 28% relative improvement on COCO object detection.
Key idea. A residual learning framework in which stacked layers fit F(x) = H(x) - x through parameter-free identity shortcuts, so that networks of 50 to 152 layers are easier to optimize and gain accuracy from depth.
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},
}