Convolutional Neural Networks

This section covers networks built from convolutions, the standard architecture for images and other grid-shaped data. The convolutional layer slides one small kernel over the input, which builds in locality and weight sharing. Its note covers padding, stride and dilation. Three companion notes in the same folder cover the receptive field, equivariance and invariance, and the $1 \times 1$ and depthwise convolutions. 5.2.2. Pooling shrinks feature maps and makes the output partly invariant to small shifts. 5.2.3. Upsampling grows them back for networks whose output is an image, most flexibly with the transposed convolution.

5.2.4. CNNs assembles these layers into classifiers such as AlexNet and VGG and into encoder-decoder networks, and explains the inductive bias that makes them work. 5.2.5. Residual Networks adds skip connections, which made networks with hundreds of layers trainable. The U-Net, an encoder-decoder with skips between matching resolutions, lives in the Specialized Architectures section.

Prerequisites

Contents

  • 5.2.1. Convolutional Layer: the 1D and 2D operation, cross-correlation versus convolution, channels and parameter counts, padding, stride and dilation, the output-size formula, the banded weight matrix, and gradients of shared weights. Not taught: im2col.
    • 5.2.1a. Receptive Field: the growth rule, downsampling and dilation, stacked small kernels, and two linear layers as one. Not taught: the effective receptive field.
    • 5.2.1b. Equivariance and Invariance: the definitions, which parts of a CNN keep or break equivariance, composition, borders and strides. Not taught: max-blur-pooling, and the converse that shift-equivariant linear layers are convolutions.
    • 5.2.1c. 1x1 and Depthwise Convolution: pointwise and depthwise layers, their weight counts, and bottleneck blocks. Not taught: grouped and depthwise separable convolutions.
  • 5.2.2. Pooling: subsampling, max pooling and average pooling, global average pooling, gradient routing, partial invariance, and the upward bias of max pooling under noise.
  • 5.2.3. Upsampling: duplication, max unpooling and the transposed convolution, with its output-size rule, matrix view and zero-insertion view. Not taught: bilinear upsampling layers and checkerboard artifacts.
  • 5.2.4. CNNs: design principles, the standard classification pipeline, AlexNet, VGG, encoder-decoder networks, and the inductive bias of convolution.
  • 5.2.5. Residual Networks: residual blocks, shattered gradients, the ensemble-of-paths view, variance growth and its fixes, projection shortcuts, bottleneck blocks, and ResNet-200.

Recommended Path

Read 5.2.1. Convolutional Layer first, since every later note uses its formulas. Its three companion notes are short and can be read in any order. 5.2.4. CNNs then shows how the pieces fit together. 5.2.5. Residual Networks explains how modern CNNs reach their depth.