Cross-Entropy Loss for Softmax Regression
For a pair of a one-hot label vector and a model's predicted probability distribution over classes, the cross-entropy loss function is defined as:
Because is a one-hot vector, the sum vanishes for all but the coordinate corresponding to the true class. This loss is bounded below by (since probabilities cannot exceed and their negative logarithm cannot be lower than ), and it only equals if the model predicts the true label with absolute certainty. However, reaching a probability of exactly requires infinite logits, so the loss is never completely for finite weights. Conversely, assigning an output probability of to the true label would incur an infinite loss ().
0
1
Contributors are:
Who are from:
Tags
Data Science
D2L
Dive into Deep Learning @ D2L
Related
What is Softmax Regression and How is it Related to Logistic Regression?
The Softmax Function, Simplified
Output Layer of Softmax Regression
Implementation of Softmax Regression Using Numpy
Implementation of Softmax Regression Using Tensorflow
Cross-Entropy Loss for Softmax Regression
Vectorized Minibatch Softmax Regression
Cross-Entropy Loss for Softmax Regression