keras/src/metrics/probabilistic_metrics.py/BinaryCrossentropy/__init__
class BinaryCrossentropy:    def __init__(
        self,
        name="binary_crossentropy",
        dtype=None,
        from_logits=False,
        label_smoothing=0,
    ):
        super().__init__(
            binary_crossentropy,
            name,
            dtype=dtype,
            from_logits=from_logits,
            label_smoothing=label_smoothing,
        )
        self.from_logits = from_logits
        self.label_smoothing = label_smoothing
        # Metric should be minimized during optimization.
        self._direction = "down"