    def log_tensors(
        self, tensors: Dict[str, torch.Tensor], log_prefix: str = "", epoch: Optional[int] = None
    ) -> None:
        """
        Required to be implemented by subclasses.

        Defines how batch or epoch tensor metrics are logged.
        """
        raise NotImplementedError
Required to be implemented by subclasses.

Defines how batch or epoch tensor metrics are logged.
allennlp/training/callbacks/log_writer.py