Repository navigation
Backpropagation
Hllinaz edited this page Jun 8, 2026
·
2 revisions
Backpropagation computes how much each weight and bias contributed to the loss.
The goal is to calculate gradients and update parameters.
For an output neuron:
delta = dL/dh * f'(z)
Where:
-
dL/dhis the derivative of the loss with respect to the output. -
f'(z)is the derivative of the activation function.
For a hidden neuron:
delta = f'(z) * sum(w_j * delta_j)
Where:
-
w_jis a weight from the hidden neuron to the next layer. -
delta_jis the delta of a neuron in the next layer.
The gradient for a weight is:
dL/dw = h_previous * delta_next
Where:
-
h_previousis the activation from the previous neuron. -
delta_nextis the delta of the target neuron.
Weights are updated using gradient descent:
w = w - learning_rate * gradient
Biases are updated similarly:
b = b - learning_rate * delta
The app can visualize:
- Delta values.
- Propagated gradient terms.
- Connection gradients.
- Parameter changes across epochs.