All models

DiffusionPolicy_resnet_encoder

ResNet-18, an 18-layer residual network with identity shortcut connections.

Image classification · 69 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (16 KB)

Open in a new tab

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.

At a glance

Parameters
11.7M
Operations
69
Framework
PyTorch
Recurrent
No
Published
CVPR (arXiv 2015)
Cited by
227,760 (as of 9 October 2026)
Authors
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
License
BSD-3-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m765
Graph hash
fbff2ad9464003c4d240b4e1e03477bf28f1cace08595f86a26ea4062d41d8e0
Skeleton hash
69415d045dc793c7ed171bd9e9e911378c3f5b9368ba92481a2ae5363cd33cc4
Architecture hash
95f6d31771dc0e256b95b12b056e845000c1790a898e56931260db6ddc9ddd69
Diagram SHA-256
0c05e30ff0819ba2dceff6cf085027a791db80eecbcc9cdee4ed2f1bc7857e37
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

torchvision.models.resnet18(weights=None)

What it is

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.

  • ResNet-18
  • resnet18
  • residual network
  • deep residual learning
  • shortcut connections
  • vision observation encoder
  • ResNet encoder
  • image encoder
  • DiffusionPolicy_resnet_encoder

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@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}, 
}