Same network shape, image-shaped layers
A convolutional neural network (CNN) is still a network: an input, hidden layers, and an output. For digits, the output is ten scores — one for each class 0 through 9.
The hidden layers here are not a single row of neurons. A convolution slides a small filter across the image and writes a feature map. ReLU then turns negative values to zero. A later convolution can combine simpler features (edges) into richer ones (corners). The last stage turns those maps into digit scores.
Go deeper
This page uses 7×7 patches inspired by MNIST (normally 28×28). The filter weights are teaching examples; a real CNN usually learns them during training. The output scores are a fixed teaching classifier so you can see which digit wins for each preset.
input 7 × 7 patch (digit 0–9 shape) conv 1 3 × 3 vertical / horizontal edges ReLU keep positives only conv 2 combine edges → corner-like map dense flatten features → scores output classes 0 … 9
Start with digit 1. Open Conv 1 and step the sliding window.
The network
Choose a digit patch, then hover layers from left to right. The output column shows which digit scores highest.
Three CNN ideas
Layers, shared filters, and digit scores.
Still a network
Input feeds hidden layers; the output is one score per digit from 0 to 9.
Shared filter
One 3×3 filter slides everywhere. Hover Conv 1 to watch a single window’s arithmetic.
Later layers combine
Conv 2 mixes edge maps. The dense stage turns those features into class scores.