- Year of appearance
- 2015
- Researchers
- Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
- Organisation
- Microsoft Research
- Architecture type
- Residual convolutional network
- Learning mechanism
- supervised
- Tasks
- Image classification, Object detection, Segmentation
Very deep convolutional networks that learn residual functions F(x) = H(x) − x through skip connections, which made it possible to train networks with hundreds of layers.
Architecture diagram
Displayed configuration: ResNet-50 (bottleneck blocks 3-4-6-3) — A stem, then four stages of bottleneck blocks (3, 4, 6, 3), then global pooling and a linear layer; the first block is detailed.
Layer table (14 nodes)
| Layer | Type | Input | Output | Repetition | Parameters | Formula | MACs |
|---|---|---|---|---|---|---|---|
| Input | input | 3 × 224 × 224 | 1 | 0 | — | ||
| Stem: conv 7×7/2 (64) + BN + ReLU + maxpool | conv | 3 × 224 × 224 | 64 × 56 × 56 | 1 | 9,536 | From the reference PyTorch implementation | 118,013,952 |
| conv 1×1 (64) + BN + ReLU | pwconv | 64 × 56 × 56 | 64 × 56 × 56 | 1 | 4,224 | From the reference PyTorch implementation | 12,845,056 |
| conv 3×3 (64) + BN + ReLU | conv | 64 × 56 × 56 | 64 × 56 × 56 | 1 | 36,992 | From the reference PyTorch implementation | 115,605,504 |
| conv 1×1 (256) + BN | pwconv | 64 × 56 × 56 | 256 × 56 × 56 | 1 | 16,896 | From the reference PyTorch implementation | 51,380,224 |
| Skip projection: conv 1×1 (256) + BN | pwconv | 64 × 56 × 56 | 256 × 56 × 56 | 1 | 16,896 | From the reference PyTorch implementation | 51,380,224 |
| Residual addition + ReLU | residual | 256 × 56 × 56 | 256 × 56 × 56 | 1 | 0 | — | |
| Two identical bottleneck blocks (stage 1) | residual | 256 × 56 × 56 | 256 × 56 × 56 | 2 | 70,400 | From the reference PyTorch implementation | 218,365,952 |
| Stage 2: 4 residual blocks | residual | 256 × 56 × 56 | 512 × 28 × 28 | 1 | 1,219,584 | From the reference PyTorch implementation | 1,027,604,480 |
| Stage 3: 6 residual blocks | residual | 512 × 28 × 28 | 1024 × 14 × 14 | 1 | 7,098,368 | From the reference PyTorch implementation | 1,464,336,384 |
| Stage 4: 3 residual blocks | residual | 1024 × 14 × 14 | 2048 × 7 × 7 | 1 | 14,964,736 | From the reference PyTorch implementation | 809,238,528 |
| Global average pooling | gap | 2048 × 7 × 7 | 2048 × 1 × 1 | 1 | 0 | From the reference PyTorch implementation | 0 |
| FC-1000 | fc | 2048 | 1000 | 1 | 2,049,000 | From the reference PyTorch implementation | 2,048,000 |
| Softmax → 1000 classes | output | 1000 | 1000 | 1 | 0 | — |
Configuration figures: ResNet-50 (bottleneck blocks 3-4-6-3)
- Input shape
- 3×224×224
- Output shape
- 1000
- Depth
- 50 layers with parameters (49 convolutions + a linear layer)
- Complexity
- About 4.1 billion multiply-adds per 224×224 image in the torchvision implementation.
- MACs note
- Computed with torch.utils.flop_counter; the paper (Table 1) reports 3.8×10⁹ FLOPs in the sense of multiply-adds.
MAC = a multiplication followed by an addition. The figures are for one forward pass of one sample with the stated dimensions; they are an analytical calculation, not a measurement of run time.
Scientific explanation
Historical background
Won the ILSVRC and COCO 2015 challenges with a top-5 error of 3.57% (an ensemble), was published at CVPR 2016, and became the most widely used backbone in vision.
The problem it addresses
The degradation problem: deeper networks give a higher training error than shallower ones even though there is no overfitting.
Core idea
Instead of learning the mapping H(x) directly, the layers learn the difference F(x) and the input is added through a skip connection; learning the zero function is easier than learning the identity.
Architecture description
A stem (7×7/2 + pooling), then four stages of residual blocks with 64→128→256→512 channels (×4 in bottleneck blocks), then global average pooling and a linear layer. ResNet-18/34 use basic blocks, and ResNet-50/101/152 use bottleneck blocks.
Data flow
224×224×3 → 56×56×256 → 28×28×512 → 14×14×1024 → 7×7×2048 → 2048 → 1000 (for ResNet-50).
Inputs
An RGB image of size 224×224.
Outputs
A probability distribution over 1000 classes (or features for downstream tasks).
Training procedure
SGD with momentum 0.9, batch 256 and a rate of 0.1 divided by 10 on plateaus, weight decay 10⁻⁴, and BatchNorm after every convolution, with no Dropout.
Loss functions
Multi-class cross-entropy.
Computational complexity
ResNet-50 about 4.1 billion multiply-adds, and ResNet-18 about 1.8 billion.
Computational requirements
ImageNet training needs several GPUs for days.
Advantages
- Stable training of very deep networks
- High accuracy at moderate computation
- A standard backbone for detection and segmentation
Limitations
- Increasing depth gives diminishing returns
- Bottleneck blocks increase activation memory use
- Implementation details (v1 vs v1.5) change the counts slightly
Equations
Residual block Residual block
\mathbf{y} = \mathcal{F}(\mathbf{x}, \{W_i\}) + W_s \mathbf{x}The output is the sum of the residual function and the input (W_s is a 1×1 projection only when the dimensions differ).
Symbols: F: residual function, W_s: skip projection
Batch normalisation Batch normalization
\hat{x} = \frac{x - \mu_B}{\sqrt{\sigma_B^2 + \epsilon}},\quad y = \gamma \hat{x} + \betaNormalises each channel with the batch statistics.
Symbols: μ_B, σ²_B: batch mean and variance; γ, β: learned parameters
Gradient flow through the skip connection Gradient through skip
\frac{\partial \mathcal{L}}{\partial \mathbf{x}} = \frac{\partial \mathcal{L}}{\partial \mathbf{y}} \left(1 + \frac{\partial \mathcal{F}}{\partial \mathbf{x}}\right)The term 1 passes the gradient directly whatever the depth.
Applications
Related models
- Successor of Densely Connected Convolutional Network (DenseNet) — DenseNet generalised the skip connection to dense connectivity by concatenation. Compare
- DETR (DEtection TRansformer) — The backbone. Compare
- Predecessor of VGG-16 — Adopted the 3×3 kernels of VGG and added the skip connection. Compare
- Predecessor of GoogLeNet — ResNet used the same 1×1 bottleneck inside the residual blocks. Compare
- Alternative EfficientNet — Higher accuracy with much less computation. Compare
- Uses a component of DETR (DEtection TRansformer) — ResNet-50 is the backbone in DETR. Compare
- Alternative Vision Transformer (ViT) — The main convolutional alternative. Compare
- Alternative Swin Transformer — An alternative hierarchical backbone. Compare
- GoogLeNet — Uses a 1×1 bottleneck like Inception. Compare
- CycleGAN — The generator uses residual blocks. Compare
- Successor of EfficientNet — Newer networks rely on efficient residual blocks. Compare
- Transformer — The Transformer uses a residual connection in every layer. Compare
- Data-efficient Image Transformer (DeiT) — A RegNet-type convolutional teacher. Compare
References
- Original paper Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun. (2016). Deep residual learning for image recognition. CVPR 2016, 770–778. doi:10.1109/CVPR.2016.90 Verified
Version 1 — last updated 2026-11-15.
