Skip to content
  • Home
  • How To
  • M0
  • M1
  • Agents
  • M2
  • M3
  • M4
  • Module 5 - Modern Architectures and Transfer Learning
  • M6
  • Progress
  • Contact
  • Pricing
  • Sign in
  • Future
  1. Module 5M5
  2. ›
    S1Convolutional Networks, Keeping the Structure
  3. ›
    Intro
  4. ›
    S1›Intro
  1. Module 5
  2. ›
  3. Section 1

Section 5.1: Convolutional Networks, Keeping the Structure

A convolution layer slides small learned filters over every channel of an image, and its output size, its parameter count and the pixels each of its outputs depends on all follow from a few lines of arithmetic. This section works that arithmetic out and trains a filter from data, adds max pooling and BatchNorm (batch normalization, rescaling each channel of a batch to a standard scale) to make a conv block, and stacks two blocks into a CNN (a convolutional network) trained with Section 4.5's loop on the same FashionMNIST images: 0.9008 on the test set against the fully connected network's 0.8677, with a fifth of its parameters. Then it runs Module 4's shift test again, finds the CNN's tolerance for a moved garment ending in its last layer, and trains it on moved images, after which it calls 0.8611 of the test images right two pixels over, where the CNN trained on images in place called 0.7795.

Section 4.5 ended on a problem it left open on purpose, a network with a weight per pixel that cannot know a shirt moved. Convolution answers part of it, and the measurements say which part: the filters carry a moved garment over, and the layer that reads them by position does not. The failures here are quiet. A stride never reads the last row, a model left in training mode answers one image differently in two batches, a head built for the wrong size is refused only when the first batch arrives, a test score reads as tolerance for movement, a random transform set on the dataset the validation images share turns every validation score into a draw, and a mirrored shoe keeps its label and still meets a network that has never seen one. None of them stops the program.

Lessons

  1. The Convolution - padding and stride and the output size, many channels in and many filters out, stacking filters and the receptive field, and a filter learned from data.
  2. Pooling, BatchNorm and the Conv Block - max pooling, batch normalization in training and in evaluation, and the conv block the rest of the section builds with.
  3. Building the CNN - Beat Your MLP - the network shape by shape, five epochs through the same loop, the test set scored once, the shift test again, and what the first filters learned.
  4. Data Augmentation - a transform that draws, label-preserving or not, augmenting the training images only, and training on moved images.

By the end you will be able to:

  • Compute a convolution's output size, parameter count and receptive field from its kernel, stride, padding and channels, and check each one against a run.
  • Build a conv block from a convolution, BatchNorm, a ReLU and max pooling, and say what BatchNorm does in training and what it does in evaluation.
  • Train a CNN with the loop you already have, keep its best epoch, and set it beside the fully connected network on validation, test and moved images.
  • Choose augmentations that keep the label and make the images a model will meet, apply them to the training images alone, and judge them on validation images framed like the deployed ones.
Your progress
Current streak
🔥 0
Lessons marked today
0 / 3
Longest streak
0

Sign in

The bootcamp

  • Curriculum
  • How To
  • Pricing
  • Changelog
  • Future

The community

  • Discord
  • Reviews
  • Contact

Follow

  • Instagram
  • X
  • TikTok
  • Reddit

Legal

  • Terms
  • Privacy
  • Refunds

Coming soon on November 16, 2026

The AI/ML Newsletter, free.

SubscribeComing soon on December 1, 2026

Confirm by email, unsubscribe in one click.

Theme