keras/src/metrics/accuracy_metrics.py/SparseCategoricalAccuracy/__init__
class SparseCategoricalAccuracy:    def __init__(self, name="sparse_categorical_accuracy", dtype=None):
        super().__init__(fn=sparse_categorical_accuracy, name=name, dtype=dtype)
        # Metric should be maximized during optimization.
        self._direction = "up"