AI engineering glossary · Deep learning core

What is BCE (binary cross-entropy)?

Binary cross-entropy (also called BCE): The cross-entropy loss for two-outcome problems: -[y*ln(p) + (1-y)*ln(1-p)], where y is 0 or 1 and p is the predicted probability of class 1. It is normally paired with a sigmoid output.

Level: beginnerTopic: Deep learning core

Binary cross-entropy: an example

For a true label 1 and prediction 0.8 the loss is -ln 0.8, about 0.22; a prediction of 0.2 costs about 1.61.

Related terms

More Deep learning core terms

Where you learn it

Binary cross-entropy is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.