Convolution
Small learned kernels scan local neighborhoods and respond to strokes, corners, and more abstract combinations.
This is not a prerecorded animation. Your pixels move through a real 62,902-parameter convolutional network while its actual feature maps, pooled tensors, dense activations, and normalized class scores render below.
Draw with a pointer, or use the keyboard-operable sample buttons for any digit from zero through nine.
Select any stage to inspect its actual values. Cyan is positive activation; violet is negative.
| Stage | Tensor | Operation | Latest time |
|---|---|---|---|
| Normalized input | 1 × 32 × 32 | Center · scale · pad | — ms |
| Convolution one | 6 × 28 × 28 | 6 learned 5×5 kernels | — ms |
| Maximum pooling | 6 × 14 × 14 | 2×2 maximum · stride 2 | — ms |
| Convolution two | 16 × 10 × 10 | 60 sparse 5×5 channel connections → 16 maps | — ms |
| Maximum pooling | 16 × 5 × 5 | 2×2 maximum · stride 2 | — ms |
| Fully connected one | 120 | 400 → 120 · scaled tanh | — ms |
| Fully connected two | 100 | 120 → 100 · scaled tanh | — ms |
| Output logits | 10 | 100 → 10 signed class scores | — ms |
| Class assignment | 10 | 10 logits → normalized classes | — ms |
Normalized class scores explain this model’s ranking for the drawing; they are not calibrated real-world probabilities.
Small learned kernels scan local neighborhoods and respond to strokes, corners, and more abstract combinations.
Each 2×2 neighborhood keeps its maximum, reducing spatial size while preserving the strongest local evidence.
The final 400 spatial values become 120, then 100 learned features before the ten digit scores are normalized.
Model equations and pretrained weights are ported from Adam Harley’s MIT-licensed nn_vis, pinned to commit d625f8f. The modern TypeScript inference worker and visualization are implemented for this portfolio.