Skip to content
masterclass Buddy

Keras · Class

losses.BinaryCrossentropy

BinaryCrossentropy measures error between binary labels and predictions. Use from_logits=True for raw logits, or use probabilities from 0 to 1 with the default setting.

Last updated

Syntax

keras.losses.BinaryCrossentropy(from_logits=False, label_smoothing=0.0, axis=-1, reduction="sum_over_batch_size", name="binary_crossentropy", dtype=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BinaryFocalCrossentropy
  • CategoricalCrossentropy
  • CategoricalFocalCrossentropy
  • SparseCategoricalCrossentropy
  • Poisson
  • CTC
  • KLDivergence

Source: Probabilistic losses. Checked 2026-11-03.