Intermediate level · Module 2 of 8 · 13 guided hours
Convolutional Neural Networks
How CNNs process images: convolution layers, channels, stride and padding, pooling, receptive fields and classifier heads, built and trained in PyTorch on CPU-sized datasets.
Learning objectives
- Explain the parts of a CNN and compute output shapes
- Build a small CNN in PyTorch
- Train it on CPU and compare it with classical pipelines
Topics
- convolution layers and channels
- stride, padding and output size
- pooling and receptive fields
- activation functions
- building nn.Module CNNs
- CNNs versus classical features
Lessons
-
Lesson 1 Inside a Convolutional Neural Network
Learners connect the hand-made filters of the Beginner level to learned convolution layers and trace how shapes change through a small CNN.
learned kernelschannels (feature maps)stride and paddingmax poolingreceptive field
-
Lesson 2 Building a CNN in PyTorch
Learners define a small CNN as an nn.Module, load images with torchvision datasets and DataLoaders, and run a first training loop on CPU.
nn.Conv2d, nn.MaxPool2d, nn.Linearforward methodtorchvision.datasets and transformsDataLoadertraining loop
-
Lesson 3 CNNs versus Classical Pipelines
Learners compare their CNN with the best classical pipeline on accuracy, robustness, training time and model size, and decide when each is appropriate.
fair comparisonrobustness teststraining timemodel sizedata requirements
Practical activity
Build and train a small CNN in PyTorch, verify its shapes and parameters, and compare it with the classical pipeline on accuracy, robustness and cost.
Expected outcomes
- Working understanding of CNNs
- Evidence-based model choice
Assessment
Shape-calculation test (30%) and the CNN notebook with comparison (70%).
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.