Cross-entropy
How do you score a prediction that is a whole distribution? Look at the probability it gave to what actually happened, and take minus its logarithm.
8 minute readOne thing to try6 questionsFree
Read the whole lesson free
Make a free account to read on, try the interactive parts, answer the 6 practice questions and keep your progress.
What this lesson covers
- The loss for one prediction is , where is the probability given to the true answer.
- Cross-entropy is the average of that over the data. Guessing uniformly over options costs .
- With softmax, the gradient at the logits is simply .