Draw a digit, show it to the network, and it learns.
The canvas is a 14×14 grid = 196 pixels. Each pixel is a number from 0 (black) to 1 (white). These 196 numbers are the network's input.
Each of the 32 hidden neurons receives all 196 inputs multiplied by different weights, plus a bias offset:
The weights (w) are numbers the network adjusts with every training step.
The result z is "squashed" into the range 0–1 via the sigmoid function:
This lets the neuron "decide" how strongly to activate. Large positive z → close to 1. Large negative z → close to 0.
The 32 values from the hidden layer become inputs to 10 output neurons (one for each digit 0–9). Again: weights × inputs + bias → sigmoid. The output is shown here:
When you press "Train X", the network compares its output to the correct answer and calculates the error:
The error is "propagated backwards" and each weight is slightly adjusted:
lr = 0.15 is the learning rate. This repeats 200 times per tap.
Network diagram: 196 inputs (aggregated) → 32 neurons → 10 outputs. Neuron brightness updates as you draw.