Training & Learning

Loss Function

The formula that scores how wrong a model is, giving training a single number to push downward.

A loss function measures the gap between what a model predicted and what it should have predicted, boiling the error down to one number. Training is essentially the search for the weights that make this number as small as possible. The choice of loss function defines what the model is actually optimizing for, which is why picking the wrong one can quietly steer a model toward the wrong behavior.

Reference: Wikipedia: Loss Function