AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Slide a small grid of weights. Trace how one patch becomes one output.
Stride is the pixel step. Padding adds zero-valued border cells.
Choose an output cell to inspect its 3 × 3 image window. Rows and columns count from 0.
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 2 | 3 | 4 | 5 | 0 |
| 0 | 1 | 2 | 3 | 4 | 5 | 0 |
| 0 | 1 | 2 | 3 | 4 | 5 | 0 |
| 0 | 1 | 2 | 3 | 4 | 5 | 0 |
| 0 | 1 | 2 | 3 | 4 | 5 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Gray cells are padding; original zeros stay white.
Full map; selected cell y[1,1]. ≈ marks rounded values.
Click an output cell, or focus it and use arrow keys. Home / End moves to the first / last column. Row and Column fields set an exact position.
Multiply matching positions, then add all nine products. Right column minus left column: positive for a rise, negative for a fall, zero when they match.
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| -1 | 0 | 1 |
| -1 | 0 | 1 |
| -1 | 0 | 1 |
| -1 | 0 | 3 |
| -1 | 0 | 3 |
| -1 | 0 | 3 |
Row sums: 2; 2; 2. Fractions are exact.
y[1,1] = 2 + 2 + 2 = 6
Nine products added.
6
Σ patch value × weight
One cell per sampled window.
5 × 5
floor((5 + 2 × 1 − 3) / 1) + 1 = 5
Weights stay fixed as the patch moves.
1 px
p = padding; s = stride
CNN convention: weights are used as shown, without flipping (cross-correlation). One input channel, no bias. These are fixed teaching filters, not learned weights.
Ramp, Edge, stride 1, zero padding 1; output 5 by 5; selected row 1, column 1, sum 6.