All models

DeepMosaic

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

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
m13445
Graph hash
fbff2ad9464003c4d240b4e1e03477bf28f1cace08595f86a26ea4062d41d8e0
Skeleton hash
69415d045dc793c7ed171bd9e9e911378c3f5b9368ba92481a2ae5363cd33cc4
Architecture hash
95f6d31771dc0e256b95b12b056e845000c1790a898e56931260db6ddc9ddd69
Diagram SHA-256
d54ce3ef9335e86f4bcb9e42d80de731de047ad3480d2c84a5ca96e6b2952924
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 residual network from the paper "Deep Residual Learning for Image Recognition", built with torchvision. The paper presents a residual learning framework meant to ease the training of networks substantially deeper than those used before it. By default torchvision builds it without pre-trained weights.

Instead of learning a mapping directly, the layers are reformulated to learn residual functions with reference to their inputs. In the network this takes the form of shortcut connections that perform identity mapping, with their outputs added to the outputs of the stacked layers. Identity shortcuts add neither extra parameters nor computational complexity. The 18-layer and 34-layer residual nets follow the paper's plain baselines, except that a shortcut connection is added to each pair of 3×3 filters.

On ImageNet the paper reports that the 18-layer plain and residual nets are comparably accurate, but the 18-layer ResNet converges faster. Its competition result came from deeper networks: an ensemble of residual nets achieved 3.57% error on the ImageNet test set. The paper states that this result won 1st place on the ILSVRC 2015 classification task.

Key idea. The paper reformulates layers as learning residual functions with reference to their inputs, which eases the training of networks substantially deeper than earlier ones.

  • DeepMosaic
  • ResNet-18
  • resnet18
  • residual network
  • deep residual learning
  • shortcut connections
  • image classification
  • torchvision resnet18

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