Week 8 Part III · Architectures & Representation Learning
Convolutional Networks I
Convolution, pooling, and feature maps; building a CNN image classifier.
Learning goals
- Build and train a CNN image classifier.
- Understand convolution, pooling, and feature maps.
- Compute how shapes and parameters change layer by layer.
This is the weekly
homework lab, completed independently after the lecture and the practice lesson. It follows the course's
Build / Predict & probe / Explain & defend model: use an AI assistant freely for the Build; the graded learning is in Predict and Explain. See the
AI-use policy and a
fully worked sample submission.
⚙Exercise
Part A · AI assistant welcomeBuild
- Build and train a CNN image classifier (for example on MNIST, FashionMNIST, or a CIFAR-10 subset).
Part B · student reasoningPredict & probe
- Compute by hand the output spatial size and parameter count of each conv and pool layer, and predict them before checking.
Part C · in plain languageExplain & defend
- Verify against the model summary, explain any mismatch, and explain what a feature map represents.
✓Deliverables
- A CNN notebook with accuracy.
- The hand-computed shape-and-parameter table versus the model summary.
Hints.- Output size = floor((in + 2p - k) / s) + 1.
- Conv parameters = (k * k * Cin + 1) * Cout; verify with a summary tool.
❓Self-check
Answer each before expanding it. If one is unclear, revisit the lab and the references.
Name two properties of convolution that save parameters.
Local connectivity and weight sharing.
What is the output-size formula for a conv layer?
floor((in + 2p - k) / s) + 1.
What does a pooling layer do?
Downsamples spatially and adds a little translation invariance.
What is the parameter count of a conv layer?
(k * k * Cin + 1) * Cout.
What does a feature map represent?
One filter's activations across spatial positions, i.e. a detected pattern.
Instructor lesson plan (with references)