Forward pass: inputs flow through layers (weighted sums plus activation functions) to produce a prediction, and a loss compares it with the target.
Backward pass: the chain rule computes the gradient of the loss with respect to every weight, layer by layer from the output back to the input.
An optimizer (SGD, Adam) then updates the weights using those gradients; repeating over many mini-batches and epochs reduces the loss.
Loading…