jasmine.metrics.categorical_cross_entropy
- jasmine.metrics.categorical_cross_entropy(y_true, y_pred, from_logits: bool = False)[source]
Compute the Categorical Cross-Entropy loss between true and predicted values.
- Parameters:
y_true (jnp.ndarray) – True categorical target values (one-hot encoded).
y_pred (jnp.ndarray) – Predicted probabilities or logits for each class.
from_logits (bool) – If True, y_pred is expected to be a raw logit output.
- Returns:
Computed Categorical Cross-Entropy loss.
- Return type: