Artificial Intelligence / Unit 9 AI 0534 worked example, 60 to 90 seconds
The Sliding Template
The idea
Convolution slides a small template of weights across the grid, computing the same weighted sum at every position — reporting, for each neighborhood, how strongly it matches the template's pattern.
In practice
One line of numbers proves the idea. Take a row with a hard boundary in it — 0, 0, 0, 9, 9, 9 — and slide the two-cell template (−1, +1), which asks: how much brighter is the right cell than the left? Position by position, the outputs read 0, 0, 9, 0, 0. Uniform stretches score zero; the edge announces itself with a spike. One template, arithmetic only, and the grid's first secret — where things change — has been extracted. Reverse the row to 9, 9, 9, 0, 0, 0 and the spike returns as negative 9: the template reports direction of change, dark-to-bright positive, bright-to-dark negative.
Where people slip
The local constraint is the wisdom — nearby pixels are related, far ones mostly are not, so the machinery is told to look locally.
Your place on the trail
Every lesson rests on earlier ones and opens later ones. Tap any to jump.
Something wrong in this lesson? Flag it · Sources for Artificial Intelligence