← Thomas de Boer

Watch a neural network read your handwriting

Draw a digit. A small neural network, written from scratch in Rust and running right here in your browser, lights up layer by layer as it decides what you drew.

1 · Draw a digit (0–9)

Mouse, finger or pen. Draw big.

2 · What the network sees

Your drawing, cropped, shrunk to 28×28 pixels and centred.

3 · Its answer

?
Draw something to start.

Inside the network

Loading…

pushes a neuron on holds it back · brighter = more active · hover or tap a neuron to see what it looks for

What am I looking at?

On the left is your drawing as 784 pixels. Each circle after that is a neuron: it adds up what the previous layer tells it, and lights up if the total is high enough. The last layer has ten neurons, one per digit; the brightest one is the answer.

Both versions are the same network with the same 58 neurons; only the weights differ. Draw something and flip the switch at the top to see how differently they react.