ResNet
Very deep CNNs made trainable by skip connections that add the input to the output.
The idea
A residual block learns a correction F(x) and outputs x + F(x). The shortcut gives gradients a direct path back through the network, which solved the degradation problem where deeper plain networks trained worse. ResNet-152 won ImageNet 2015 and residual connections are now everywhere, including transformers.
y = F(x) + x
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- plain
- with skip connections
The learning signal (gradient) starts at the output and travels backwards through 20 layers. Bar height shows its size at each layer on a log scale.
- layers back:
- 0
A residual block computes x + F(x). The "+ x" is a shortcut the gradient can travel along.
Step by step
- 1Pass x through two or three convolutional layers to get F(x).
- 2Add the original x (the skip connection).
- 3Apply the activation.
- 4Stack many blocks, using 1×1 convolutions to match shapes when needed.
Where it is used
Backbone for classification, detection and segmentation.
Watch out for
Heavier than efficiency-focused designs such as MobileNet.