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.











