Inkwell
Ink a digit and watch the exact network from 3Blue1Brown think. Every neuron and weighted connection is live, and the matrix math runs in hand-written WGSL compute shaders on your GPU. The activations you see are the numbers those shaders just wrote. No machine-learning or graphics libraries.
Draw a centred, upright digit that fills the box. Trained on centred MNIST digits, so very off-centre or tiny strokes may confuse it.
95.8% on the MNIST test set. That is test-set accuracy on centred MNIST digits, not a claim about all handwriting.
Educational, not state of the art. Modern convolutional networks exceed 99.7%. This is deliberately the small, legible network so you can see every neuron and weight: a 784-16-16-10 perceptron, about 13,000 parameters.
Hover any neuron to see its incoming weights. A hidden-layer-1 neuron shows its 784 weights as a 28x28 image, the pattern it looks for. Blue is a positive weight, red is negative.
The matrix multiplies run in WGSL compute shaders on your GPU, and the activations you see are read back from those same buffers. A plain JavaScript version runs alongside and checks the GPU result on every stroke.
About
Built by Dr. Safeer Ali Mirani, GPU / XR / real-time visualisation engineer (PhD).
safeer.ali.mirani@gmail.com · Portfolio · GitHub · LinkedIn
Data: the MNIST database of handwritten digits (Yann LeCun, Corinna Cortes, Christopher Burges). The images here are the canonical MNIST files, checksum verified against the original distribution.
Inspired by 3Blue1Brown's "But what is a neural network?", and in the spirit of Adam Harley's interactive digit visualisation. Rebuilt as the flat perceptron with inference in raw WebGPU compute.
Compute: the model trained offline in NumPy. Weights are frozen and embedded in this page. Live inference runs on your GPU, and a plain JavaScript copy checks it on every stroke.