IntermediateAbout 25 min

    MNIST Neural Network

    Read the full article on Substack

    6 min read.

    A small neural network, drawn in 2D, reads simple 5×5 pictures of digits. Step through one picture to see each hidden unit add up the pixels it cares about and the output layer turn the result into ten probabilities. Then flip a few pixels to watch the confidence shrink, and replay how the weights were learned. A link opens a separate 3D tool trained on real MNIST handwriting, where you draw a digit and watch activations flow through a 3D network (its interface is in German: Ziffer zeichnen means draw a digit).

    Trained network, 25 inputs, 12 hidden, 10 outputs
    PixelsHiddenDigit0123456789

    A 5 by 5 picture of a 3. Each of the 25 pixels is a number, 1 for dark and 0 for light.

    1/6

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Classify one digit

    Sequence

    Order the path of a 28×28 image through the network.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    6. 6Drop a step here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    The MNIST dataset consists of…

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going