← All demos
Lab · live demo

Inkwell

A neural network trained and visualised in the browser, every weight visible.

Runs in your own browser. Most Lab demos need WebGPU, available in recent versions of Chrome, Edge and Safari on a computer.

Inkwell: screenshot of the live demo

Inkwell shows a small neural network recognising handwritten digits, with every neuron and connection visible. Draw a digit and watch the network respond, in a flat view or in 3D.

The network is deliberately small and easy to follow: a 784-16-16-10 perceptron with about 13,000 parameters, the design used in 3Blue1Brown’s well-known explainer. It scores 95.8% on the MNIST test set of centred handwritten digits. It is a teaching model, not a state-of-the-art one.

The matrix maths run in hand-written WGSL compute shaders on the visitor’s graphics card, checked live against a plain JavaScript version of the same network. No machine-learning or graphics libraries are used. Hovering over a neuron shows its incoming weights; in the first hidden layer they appear as a 28 × 28 image of the pattern the neuron looks for.

Data: the MNIST database of handwritten digits.

About the Lab

Lab demos are working experiments that show the methods behind our products. The same techniques can be built into software for your organisation.

See all demos →

↑↓ to move · Enter to open · Esc to close