Intuition
The loss turns model mistakes into a number. Training tries to make that number smaller.
Technical definition
A loss function maps predictions and targets to a scalar objective optimized by an algorithm such as gradient descent.
Example
Cross-entropy loss penalizes a classifier when it assigns low probability to the correct class.
Common misunderstandings
- Lower training loss does not always mean better real-world performance.
- The loss function shapes what the model optimizes, not necessarily what users value.