A convolutional network that reads handwriting, trained end to end and running live in the browser.
Can a neural network learn to read handwriting, and can the trained model then run live in a browser with no server? The problem that put deep learning on the map, taken end to end from raw pixels to a thing visitors can actually play with.
The classic MNIST benchmark: 70,000 real 28 by 28 grayscale images of handwritten digits, split 60,000 for training and 10,000 held back to test on. Pixels normalized to 0 to 1, labels 0 through 9.
Build a convolutional neural network in TensorFlow and Keras: two convolution and pooling blocks to learn visual features, then dense layers to decide, then train for 8 epochs and watch the learning curves, then evaluate honestly with a confusion matrix, then ship the roughly 27,000 trained weights into the page and run the network with a from-scratch forward pass in JavaScript, so it predicts your drawing on the spot.
The compact CNN reached 98.7% accuracy on digits it had never seen, and the learning curves stayed healthy, with train and validation tracking together and no overfitting. The confusion matrix showed the handful of errors were the humanly reasonable ones, a 4 mistaken for a 9, a 7 for a 1. Best of all, the model is small enough to deploy to the browser: draw a digit on the live pad and the same trained network classifies it instantly, no round trip to any server.