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-overlapping s×s max pooling. If a side isn't divisible by s, drop the leftover rows or columns.
checks
  • conv2d on a small examplenot run
  • conv2d matches a reference on random datanot run
  • max_poolnot run
python sleeps until you press run

Press Run & check. Your code runs first, then the hidden checks on the left.