CategoricalCrossentropyΒΆ

Computes the crossentropy loss between the labels and predictions.

Abstract Signature:

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

PyTorch

API: torch.nn.CrossEntropyLoss
Strategy: Direct Mapping

Keras

API: keras.losses.CategoricalCrossentropy
Strategy: Direct Mapping

TensorFlow

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

Apple MLX

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