Cross-entropy loss

For one example, −ln of the probability the model gave the correct answer; also called log-loss.

Softmax gives a probability for every class; the loss for one example is the surprise at the right answer: loss = −ln p(correct class) This is the cross-entropy loss, also called log-loss.
From Softmax and cross-entropy, step “Cross-entropy: the loss for classifiers”

See it in action

Try cross-entropy loss hands-on in the lesson Softmax and cross-entropy, part of the The maths behind AI course.

Open the lesson