def METHOD_NAME(self, predictions, batch, stage):
    "Given the network predictions and targets computed the CE loss."
    predictions, lens = predictions
    spkid, spkid_lens = batch.spk_id_encoded
    loss = self.hparams.compute_cost(predictions, spkid, lens)
    if stage != sb.Stage.TRAIN:
        self.error_metrics.append(batch.id, predictions, spkid, lens)
    return loss