def METHOD_NAME(self, batch):
    self.msg = "Evaluate: "
    losses_dict = {}
    before_outs, after_outs, text_outs = self.model(
        speech=batch["speech"],
        text=batch["text"],
        masked_pos=batch["masked_pos"],
        speech_mask=batch["speech_mask"],
        text_mask=batch["text_mask"],
        speech_seg_pos=batch["speech_seg_pos"],
        text_seg_pos=batch["text_seg_pos"])
    mlm_loss, text_mlm_loss = self.criterion(
        speech=batch["speech"],
        before_outs=before_outs,
        after_outs=after_outs,
        masked_pos=batch["masked_pos"],
        text=batch["text"],
        # maybe None
        text_outs=text_outs,
        # maybe None
        text_masked_pos=batch["text_masked_pos"])
    loss = mlm_loss + text_mlm_loss if text_mlm_loss is not None else mlm_loss
    report("eval/loss", float(loss))
    report("eval/mlm_loss", float(mlm_loss))
    if text_mlm_loss is not None:
        report("eval/text_mlm_loss", float(text_mlm_loss))
        losses_dict["text_mlm_loss"] = float(text_mlm_loss)
    losses_dict["mlm_loss"] = float(mlm_loss)
    losses_dict["loss"] = float(loss)
    self.msg += ', '.join('{}: {:>.6f}'.format(k, v)
                          for k, v in losses_dict.items())
    self.logger.info(self.msg)