Convolution arithmetic
Compute conv output shapes and parameter counts like the exam asks, then paint an image and watch an edge detector light up — parameter sharing you can see.
Predict first
Commit to a guess before you touch anything. Being wrong here is how it sticks.
W = 32, K = 5, P = 0, S = 1. Output width?
Experiment
Move the controls and watch the outputs. Goals tick off automatically when you reach them.
Output size & parameters
(3·3·3 + 1) · 64 — independent of image size, thanks to parameter sharing.
Kernel playground
| -1 | 0 | 1 |
| -2 | 0 | 2 |
| -1 | 0 | 1 |
The same 9 weights slide over every position — that's why a conv layer works anywhere in the image (translation equivariance).
Explain it
Put what you saw into words. This is what the exam will ask you to do.
Why do CNNs beat fully connected networks on images? Name the two inductive biases and what pooling adds.
Code it
Write real code against real data. Python and SQL run right here in your browser and hidden tests check your work; the AI reviews it like an examiner.
Shapes and parameter counts
Write conv_out(w, k, p=0, s=1) → output width ⌊(w − k + 2p) / s⌋ + 1, and
conv_params(k, c_in, c_out, bias=True) → (k·k·c_in + 1)·c_out (no +1 without bias).
Then use them to print the shapes and parameters of: 64×64×3 → conv3×3(32, p=1) → maxpool 2×2 →
conv3×3(64, p=0).
Challenge
Fixed variations, a new problem every day, and unlimited AI challenges built from your current settings.
ResNet Stem Spatial Output
ResNet's first layer: input 224×224, kernel 7×7, padding 3, stride 2. What is the output spatial width?