def METHOD_NAME(self, predictions, batch, stage):
    "Given the network predictions and targets computed the forward loss."
    predictions, lens = predictions
    phns, phn_lens = batch.phn_encoded
    sum_alpha_T = self.hparams.aligner(
        predictions, lens, phns, phn_lens, "forward"
    )
    loss = -sum_alpha_T.sum()
    if stage != sb.Stage.TRAIN:
        viterbi_scores, alignments = self.hparams.aligner(
            predictions, lens, phns, phn_lens, "viterbi"
        )
    return loss