TensorFlow.js MNIST classifier

This experiment shows how you can use the power of Machine Learning directly in your browser to train and use a simple Neural Network with 3 layers (1 hidden) of the form (32 : 16 : 10) to classify handwritten digits from the MNIST dataset.

See console for even more outputs.

Input Image

Input image is a 28x28 pixel greyscale image from the MNIST dataset - a real hand drawn digit!


Below you see what number the trained TensorFlow.js model has predicted from the input image.

It should get it right most of the time, but of course it's not perfect, so there will be times when it doesn't. Red is a wrong prediction, Green is a correct one.

Training model. Please wait...

Change interval between classifications! Currently 1000ms