The whole idea.
This network has one input x, two hidden neurons and one output y. It has seven
numbers that training adjusts: each hidden neuron has a weight and a bias (w1, b1 and
w2, b2), and the output has a weight for each neuron (w3, w4) and a bias
b3.
• Forward pass: each neuron computes z = w·x + b, then ReLU keeps it if
it is positive and makes it 0 if not. The output adds the two neurons up with its own weights:
y = w3·h1 + w4·h2 + b3. The loss measures the miss:
L = (y − t)², where t is the target.
• Backward pass: start at the loss and walk back, one box at a time. Each step multiplies by
one small local slope, the chain rule. At the end, every one of the seven numbers has a gradient
(purple): how much the loss changes if that number moves up a little.
• Update: move every number a small step against its gradient,
new = old − η × gradient, as on the optimizers page.
Doing that over and over, on all five points at once, is training.