Drawing
A digit drawing: a 12 × 12 grid with 40 cells filled. Tap a cell to fill or empty it; you can change the drawing as you like.
A list of 144 numbers
The network does not see a grid but a list of 144 numbers: the rows are laid end to end, a filled cell is 1, an empty one 0. The network has to learn by itself which cells are neighbours.
Hidden layer
Each of the 32 hidden neurons takes a weighted sum of the 144 numbers and passes it through ReLU; a negative sum becomes 0. Dark squares are neurons that fire strongly; for this drawing 20 neurons did not fire at all. The selected neuron is h11, with value 12.15. Tap a neuron to select it.
What a neuron looks at
The 144 weights of neuron h11 laid out as a grid: red cells make the neuron fire when filled, blue cells hold it back. The neuron fires as much as the drawing's ink falls on red areas.
Ten probabilities
The output layer turns the 32 values into ten logits, and softmax turns those into probabilities. The bars show the probability of each digit as a percentage.
Prediction
The network predicts 3 with 100.0 percent probability. Second is 8, with 0.0 percent.
Why it matters
All this network knows sits in 4970 numbers: 144 × 32 and 32 × 10 weights plus the biases. Nobody told it what a digit looks like; the weights were learned from example drawings with backpropagation.