Skip to content

Cheatsheet: Neurons as numbers, layers as structure

neuron = a container holding one number between 0 and 1 (its "activation")
network = layers of neurons, with numbers flowing forward, layer to layer

No biology, no thinking. Just numbers in boxes, moving one direction.

LayerNeuronsEach neuron holds
Input784 (one per pixel of a 28x28 image)that pixel’s brightness (0 = black, 1 = white)
Hidden 116a value computed from the previous layer
Hidden 216a value computed from the previous layer
Output10 (one per digit 0-9)a confidence score; tallest = the guess

Total: 784 + 16 + 16 + 10 = 826 neurons. (2 hidden layers of 16 is a design choice, not a rule.)

  • Activation: the number a neuron holds, 0 to 1. Near 1 = “lit up”; near 0 = quiet.
  • Input layer: one neuron per pixel; loads the image as raw brightness values.
  • Output layer: one neuron per possible answer; highest activation is the network’s guess.
  • Hidden layer: any layer that is not input or output; does the work of turning pixels into a guess.
  • Feedforward: numbers flow one direction only, input to output, no loops.

Pixel into the input layer. Pixel at row 10, column 14, brightness 0.7. Numbering row by row: neuron number = 10 x 28 + 14 = 294. So input neuron 294 holds activation 0.7.

Reading the output layer. Output activations (digits 0 to 9):

0:0.02 1:0.01 2:0.05 3:0.92 4:0.03
5:0.04 6:0.01 7:0.02 8:0.01 9:0.02

Tallest is digit 3 at 0.92 → guess is 3, high confidence.

  • “A neuron is like a brain cell.” No. It is a container for one number, 0 to 1.
  • “Activations are on or off.” No. Any value 0 to 1; the in-between is where the information lives.
  • “2 layers of 16 is meaningful.” No. A clean teaching choice; real networks vary widely.
  • “The first layer detects edges, the next detects loops.” That is the hope, not a proven fact. A trained network’s real patterns are messier and less human-readable.

Maybe hidden layer 1 notices small edges, hidden layer 2 combines them into loops and strokes, and the output assembles those into digits. Useful first picture, but a later lesson shows the reality is messier. Motivation, not description.

A neural network is just layers of numbers, and the only thing that ever moves through it is numbers.