Deep Learning

Inside a Digit Classifier

Draw a digit and watch a pretrained MNIST classifier read it, as a plain stack of layers or as a convolutional network. Every wire is lit by what it carries, and clicking a neuron opens it up to show the picture it looks for.

a wire carrying a positive valuea wire carrying a negative onethe neuron you opened

Drag on the pad to draw · click any neuron to open it

—
—

only the loudestall of them
Values
it says—
how sure—
runner-up—
neurons firing—
weights in this network—
accuracy on unseen digits—

What to observe

  1. Turn wires drawn down to a few percent. What is left is the handful of connections actually carrying the decision.
  2. Click a neuron in the first layer. Its incoming weights are one number per pixel, so they form a picture, drawn under the pad: smudged strokes and loops that minimising the loss left behind.
  3. Switch to Convolutional. The first stage is eight filtered copies of your digit, each made by one 3×3 kernel reused at every position. It is right more often on unseen digits with about a sixth of the weights.
  4. Draw something that is not a digit. It answers anyway: softmax hands out exactly one unit of probability, so it has no way to say none of these.

Shortcuts:f fullscreen