Convolutional architectures
VGG-style depth, the Inception idea, ResNet and why residuals train, MobileNet-style efficient blocks — backbones for later tasks.
From a layer to a network
The topic Convolution took one layer apart: weights, cost, receptive field. A classifier stacks dozens of them, and how to stack them is a design problem with many answers. This topic follows the answers that shaped the field — each fixing a problem the previous one left.
LeNet-5 (LeCun et al., 1998) already set the pattern on digits: convolutions, downsampling, more channels as the map shrinks, then a dense classifier. Modern reimplementations with full channel connections have about k parameters. Two limits show up early: the dense head fixes the input size, and the last convolution’s receptive field is still small (~).
AlexNet kept the pattern and scaled it to ImageNet: five convolutions (first , stride 4) and three dense layers, ~60M parameters. In torchvision’s single-tower count, ~96% of the parameters sit in the dense head; the convolutions do most of the FLOPs. ReLU, dropout and augmentation made the scale trainable — see What deep learning is.
VGG: stacks of small kernels
VGG (Simonyan and Zisserman, 2015) asked what depth alone does. Every convolution is with stride 1 and padding 1; every downsampling is max pool with stride 2; channels double after each pool, from 64 to 512.
By the receptive-field recursion, layers of at stride 1 see . Three such layers match one in field of view, but cost weights against , and apply three nonlinearities instead of one. At that is against .
The price: VGG-16 has 138M parameters ( AlexNet; ~89% in the fully connected head) and ~15.3B FLOPs per image — about a typical AlexNet count (~0.7B multiply-adds) at the same resolution and counting convention. Parameters and FLOPs are different bases here: the head inflates , the convolutions dominate cost. Global average pooling later removed most of that head.
Inception: branches and 1×1
GoogLeNet / Inception (Szegedy et al., 2015) lived under a compute budget: 22 layers, ~12× fewer parameters than AlexNet, ILSVRC-2014 winner at 6.67% top-5 error.
An Inception module runs four branches on the same map — , , and a pooling branch — and concatenates along channels. A raw on all input channels would dominate cost, so each expensive branch is preceded by a reduction (the pointwise convolution of the previous topic).
Worked numbers for inception (3a) on a map: branches to 64, , and pool channels give 256 outputs and weights (~128M multiply-adds). Without the two reductions the middle branches alone would need weights instead of . GoogLeNet also replaced the dense head by global average pooling and, during training only, attached auxiliary classifiers; later Inception versions found the auxiliaries acted mostly as regularizers once BatchNorm was in place.
ResNet: residuals and degradation
By 2015, BatchNorm and careful init (see Normalization and initialization) kept signals alive in deep plain nets. They still trained poorly. On ImageNet, a 34-layer plain net had higher training error than an 18-layer one throughout training (He et al., 2016). That is the degradation problem: not overfitting (train error is worse too), and not vanishing gradients (norms stayed healthy). The deeper net can represent the shallower one by setting extra layers to identity; the optimizer does not find that.
Key idea: make identity the default. A residual block outputs . With small weights, and the block passes its input through; each block only learns a correction, and the shortcut carries the gradient past every block through an identity term (as derived in Machine Learning).
The basic block (ResNet-18/34) is two convolutions with BN and a ReLU between them; add, then ReLU. The bottleneck (ResNet-50+) is through a quarter of the channels: at 256 channels, weights against for two full-width layers. When shape changes, a projection shortcut matches dimensions; elsewhere identity shortcuts stay free. With shortcuts, depth helped again: ResNet-152 undercut VGG-16 in FLOPs and won ILSVRC-2015.
MobileNet and scaling
DenseNet concatenates every earlier map inside a block instead of adding: features are reused, each layer adds only new channels (growth rate), and transition layers shrink channels and resolution between blocks. Memory grows with the concatenated maps.
MobileNet (Howard et al., 2017) targets phones. A standard convolution mixes neighbours and channels at once; a depthwise-separable convolution does them separately: one filter per input channel (groups=M), then a mix. The cost ratio is
about for and large . At on , weights fall from ~2.36M to ~267k. Almost all remaining cost sits in the layers.
EfficientNet (Tan and Le, 2019) scales depth, width and resolution together: , , with so each unit of roughly doubles FLOPs. With , multiplies FLOPs by ~96 and grows a input toward ~ pixels (EfficientNet-B7).
Transfer learning
A network trained on ImageNet splits into a backbone (convolutions up to global pooling) and a head (the final linear classifier). Early layers learn edges and textures that transfer widely; later layers become task-specific (Yosinski et al., 2014).
- Feature extraction / linear probing. Freeze the backbone, train a new head. Cheap, hard to overfit.
- Fine-tuning. Train everything from the pretrained weights, usually with a smaller learning rate on the backbone. Better when the new data differ and there are enough of them.
Preprocess exactly as during pretraining (including per-channel normalization). Better ImageNet models tend to transfer better, with caveats on small fine-grained sets (Kornblith, Shlens and Le, 2019). Self-supervised learning later pretrains backbones without labels.
The backbone and the next task
Side-by-side ImageNet numbers from different papers are not a clean ranking: recipes, resolutions and evaluation protocols move accuracy by several points (two ResNet-50 rows in torchvision differ by ~4.7 points at identical architecture). Within one controlled comparison — MobileNet’s standard vs separable convolutions, or plain vs residual at matched width — a gap means something.
Every network in this topic answers one question per image: which class. Most vision uses need more — where each object is, and how many there are. The next topic, Object detection, keeps these backbones and changes the head: from one label to a set of boxes with classes, with the losses and metrics that come with it.
Check your understanding
The same questions as in Pulse. Answers are shared between modes.
Go deeper — optional
Code and labs do not count toward the main percentage or the certificate.
- Residual vs plain: depth degradationoptional
NumPy sin-x regression: deep plain ReLU vs residual. Self-check in the notebook.
~25 min · easier on a computer · Convolutional architectures topic read.
Self-check in the notebook — not part of mastery or the certificate.
Answers are saved on the server and tied to this browser until you sign in.