keras/src/metrics/probabilistic_metrics.py/SparseCategoricalCrossentropy/__init__
class SparseCategoricalCrossentropy:    def __init__(
        self,
        name="sparse_categorical_crossentropy",
        dtype=None,
        from_logits=False,
        axis=-1,
    ):
        super().__init__(
            sparse_categorical_crossentropy,
            name=name,
            dtype=dtype,
            from_logits=from_logits,
            axis=axis,
        )
        self.from_logits = from_logits
        self.axis = axis
        # Metric should be minimized during optimization.
        self._direction = "down"