Machine Learning Fundamentals · free preview
Cross-Entropy and Its Gradient
Softmax cross-entropy is the negative log-likelihood of the correct class, and its gradient with respect to the scores has the same shape as linear regression's: the feature vector times a residual.
1. From probability to loss
From probability to loss
2. The simplified form
The simplified form
3. The gradient
The gradient
4. What the loss charges
A three-class model assigns probability to the true class, whose one-hot label is . The per-example loss is . The value of that loss is closest to which number?
5. The gradient at the true class
A model's softmax output for the true class is with label . The gradient component equals ____.
Practice this interactively
Free account · instant grading · spaced review that schedules itself.
Start this course for free