🤖 Machine Learning / AI
Beginner
What is backpropagation?
Answer
Backpropagation is the algorithm used to compute gradients of the loss function with respect to each weight in a neural network. It applies the chain rule of calculus to propagate the error signal backward from the output layer through the hidden layers. The forward pass computes activations and the loss; the backward pass computes gradients layer by layer. These gradients are then used by an optimizer (e.g., SGD, Adam) to update weights. Backpropagation is the cornerstone of all gradient-based neural network training.