3 hidden checks
Implement the two core operations of a CNN for a single-channel image.
conv2d(img, K): valid cross-correlation (no padding, stride 1) of a 2-D image with a square 2-D kernel, as in the lesson's formula (no bias). Output shape(H - k + 1, W - k + 1).max_pool(x, s): non-overlappings×smax pooling. If a side isn't divisible bys, drop the leftover rows or columns.
- conv2d on a small examplenot run
- conv2d matches a reference on random datanot run
- max_poolnot run