MNIST Digit Reader

MNIST Digit Reader

Draw a digit from 0 to 9. A small convolutional network trained on the MNIST handwriting set reads it live, right in your browser.

54,314 parameters99.25% on 10,000 test digitstrained on 60,000 digits

Draw here

What the model sees: your drawing cropped, shrunk to fit a 20×20 box, and centered by mass in a 28×28 grid, the same way MNIST was prepared.

Prediction

–
–

Draw something to start.

Inside the network

Each stage below updates as you draw. Brighter cells mean stronger activation.

Conv layer 1

8 learned 5×5 filters slide over the image. Each one lights up where its pattern appears, such as a stroke at a certain angle.

28×28×8
positive weightnegative weight

Conv layer 2

After max-pooling halves the size, 16 filters combine layer 1's maps into larger parts like loops, corners and line ends.

14×14×16

Dense layer

The pooled maps are flattened to 784 numbers and mixed into 64 hidden units. Different digits light up different combinations.

64

Output

10 final scores pass through softmax and become the probabilities shown in the prediction panel.

10

Messy or ambiguous drawings split the probability across look-alikes such as 4 and 9, or 3 and 5.