def _compute_loss(self, model_output):
        """ Computes the loss for the whole batch.

        Notes:
        ------
        Unless overriden, the default behavior is to return the mean of all individual losses.
        """
        try:
            return T.mean(self.losses)
        except __HOLE__:
            raise NotImplementedError("Subclass of 'Loss' must either implement '_compute_loss(model_output)' or '_compute_losses(model_output)'.")
dataset/ETHPy150Open SMART-Lab/smartlearner/smartlearner/interfaces/loss.py/Loss._compute_loss