Handwritten digits

Draw a digit and inspect each stage of its prediction.

Draw with your mouse or finger.

Prediction

? Ready

Probabilities

Hidden layer

128 ReLU activations

28×28 pixels flattened to 784, then Linear to 128, ReLU, and Linear to 10.

About this model

A two-layer perceptron with 128 ReLU hidden units, trained on MNIST with Adam at batch size 64. It gets 95.9% of the test set right.

Before it reaches the model, your drawing is scaled into a 20 pixel box and centred by its mass, the same way the MNIST digits were prepared. The bars and squares above are read from WebAssembly memory after each prediction.