BinaryCrossentropyΒΆ

Computes the cross-entropy loss between true labels and predicted labels.

Abstract Signature:

BinaryCrossentropy(from_logits: bool = False, label_smoothing: float = 0.0, axis: int = -1, reduction: str = sum_over_batch_size, name: str = binary_crossentropy)

PyTorch

API: torch.nn.BCELoss
Strategy: Direct Mapping

Keras

API: keras.losses.BinaryCrossentropy
Strategy: Direct Mapping

TensorFlow

API: tf.keras.losses.BinaryCrossentropy
Strategy: Direct Mapping

Apple MLX

API: mlx.nn.losses.BinaryCrossEntropy
Strategy: Direct Mapping

Flax NNX

API: optax.sigmoid_binary_cross_entropy
Strategy: Plugin (loss_wrapper)

PaxML / Praxis

API: optax.sigmoid_binary_cross_entropy
Strategy: Direct Mapping