liveBook · Manning

Residual connection

As explained in Math and Architectures of Deep Learning

A connection that adds a layer's input to its output so information and gradients can bypass one or more layers.

A residual connection adds a layer block’s input to its output. Instead of learning h(x) directly, the block learns a residual g(x) = h(x) − x, then combines it with the input. This shortcut makes the identity function easier to represent and helps deeper networks avoid degradation when simply stacking layers stops improving training accuracy. section 11.2.3 section 11.5

A residual block connects the main transformation with an identity or projection shortcut:

  • The shortcut passes the input directly when its shape already matches the transformed output. section 11.2.3
  • The resulting shortcut structure supports training substantially deeper convolutional networks such as ResNet. section 11.5

ResNet-34 in PyTorch

A ResNet-34 assembles several ResidualConvBlock modules. Some preserve feature-map size, while others reduce it and use a projection shortcut; torchvision also exposes a ready-made resnet34 model.

How Math and Architectures of Deep Learning covers it

How deep it goes
Defines residual learning, explains identity shortcuts, and reaches PyTorch block and architecture implementations.
Examples
Uses CIFAR-10 depth comparisons, residual-block diagrams, PyTorch BasicBlock code, and ResNet-34 construction.
What it assumes
Assumes neural-network layers and convolutional architectures while explaining why identity mappings challenge ordinary stacked layers.
What you can do after
Builds residual blocks in PyTorch and assembles or invokes a ResNet-34 model.
How it connects
Connects residual connections to ResNet, identity functions, convolutional neural networks, and degradation.

Also explained in

Compare how 12 books explain residual connection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math and Architectures of Deep Learning. The section links point to the parts of the book it draws on.