A deep learning model is being trained for a binary classification task. The output layer uses a sigmoid activation and the loss function is binary cross-entropy. If the model outputs a probability of 0.9 for a sample with true label 1, what is the contribution of this sample to the loss?

Answer

-log(0.9)

Explanation

Binary cross-entropy loss for a true label y=1 is -log(p), where p is the predicted probability. Thus, the loss is -log(0.9).

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list