Skip to content
BIASED

Losses and regularization

Block 1 of 7~1 min

From the pipeline to the loss

The topic PyTorch and automatic differentiation built a training pipeline and used cross-entropy in it without asking why. Two parts of that pipeline decide what the network actually learns. The loss says what counts as a good prediction and, through its gradient, how hard each example pulls on the weights. Regularization decides what happens once the network can fit its training set exactly — which a deep network almost always can. This topic covers both.

Notation. Residual r=f(x)−yr = f(x) - y. For KK classes, logits zz, probabilities pk=ezk/∑jezjp_k = e^{z_k}/\sum_j e^{z_j}, one-hot eye_y. Parameters θ\theta, learning rate η\eta, weight-decay coefficient λ\lambda, dropout probability pp, label-smoothing ε\varepsilon.

Answers are saved on the server and tied to this browser until you sign in.