convolution -- kernel sliding over input (stride / padding / dilation)
An image is a grid of numbers, and this is how a vision model examines one. A small grid of weights — nine numbers, say — is laid over a patch of the picture, each weight is multiplied by the number underneath it, and the total becomes one number in a new grid. Slide the little grid one step and repeat, and you have swept the whole image with one detector: the weights decide what it responds to, an edge running one way, or a patch of a certain colour. Three settings change what comes out: how far it jumps between stops, whether a border of zeros is added so the result does not shrink, and whether the weights are spread apart to cover more ground without using more of them.
Interactive page: 2-D convolution as a small kernel sliding across an input feature map, each output pixel a sum of products over the receptive field -- with the geometry knobs that set the output size: stride, padding, dilation. Anchor: F (CNN / vision); Family F.
What it shows
A k×k kernel W slides over the (zero-padded) input X. At each output position (oy, ox) it multiplies its weights with the input cells under it sums:
out[oy, ox] = Σᵢⱼ W[i, j] · Xpad[oy·s + i·dil, ox·s + j·dil]
- stride
s: how far the kernel jumps between output pixels (bigger stride ⇒ smaller output, coarser sampling). - padding
p: a border of zeros aroundX(keeps the output from shrinking; "same" padding). - dilation
dil: gaps between the kernel taps (a larger receptive field for the samekweights -- atrous convolution).
Output size: out = max(1, ⌊(n + 2p − dil·(k−1) − 1)/s⌋ + 1). The current receptive field is outlined on the input with the kernel weights overlaid; the output grid fills as the kernel slides (auto-plays + loops), and the readout shows the sum-of-products for the current pixel.
Drag any input cell to change its value and watch the affected outputs recompute; hover any input / kernel / output cell for its value (and an output cell's full Σ). Step to slide the kernel one position at a time.
Render tier
T1 (Canvas2D: the padded input grid + kernel overlay, the output grid, and the sum-of-products).
Wiring
layout.mount + controls (n, k, stride, pad, dilation, seed) + an output-position Transport (slide the kernel) + onPointer input-cell drag hover. ?step / ?drag / ?hover hooks. Source: page.js.