3.6 Convolutional networks
1. Learn
Section titled “1. Learn”- CS231n, Convolutional Neural Networkssections "Architecture Overview" through "ConvNet Architectures"
- Understanding Deep Learning (Prince)chapter 10 Convolutional networks (pp. 161–185)
2. Bridge
Section titled “2. Bridge”A convolution is a constrained dense layer. A dense layer from a 32×32×3 image to a same-sized output needs about 9.4 million weights. A 3×3 convolution with three input and three output channels needs 81 (plus 3 biases). Each output connects only to a small window of the input (sparse), and every window uses the same weights (shared). Because the same weights run everywhere, shifting the input shifts the output: convolution is translation equivariant (UDL §10.1–10.2). Deep learning libraries compute cross-correlation, sliding the kernel without flipping it, and call it convolution.
Output size. Along each axis, an input of size with kernel , padding , stride and dilation gives outputs. Padding with stride 1 keeps the size (“same”); stride 2 roughly halves it (CS231n convolution notes; Dumoulin and Visin 2016).
Receptive fields and pooling. One unit of a stack of 3×3 layers sees a region that grows by 2 per layer, and every stride multiplies later growth. Max-pooling keeps the largest value in each window: it shrinks the map, adds a little invariance to small shifts, and in the backward pass sends the gradient only to the winner (UDL §10.4). Early filters typically detect edges and strokes; later ones combine them into parts (Zeiler and Fergus 2014).
im2col. Copy every receptive field into a row of a matrix, and the whole convolution becomes one matrix product with the flattened kernels, which is how fast libraries compute it (CS231n). The backward pass of a convolution is again a convolution:
3. Explore
Section titled “3. Explore”Write the output-size formula, im2col, a convolution forward pass built on it, the backward pass and max-pooling. The tests compare you with a direct four-loop convolution, run the gradient checker for several strides and paddings, and check equivariance.
stubs/m3_6_conv.pyLoading starter file…
Prefer your own editor? Edit exercises/stubs/m3_6_conv.py and run mlc check 3.6. The tests are identical; import the results on the progress page.
Locally: mlc check 3.6.
5. Check
Section titled “5. Check”- not yet: All tests pass (0/?)
- not yet: Checkpoint quiz ≥ 80%
Learner log: time spent and points of confusion
Every confusion you note becomes a fix before the module is marked stable. Export it from the progress page and attach it to an issue.