def METHOD_NAME(self, stage, stage_loss, epoch=None):
    "Gets called when a stage (either training, validation, test) ends."
    if stage == sb.Stage.TRAIN:
        self.train_loss = stage_loss
    if stage == sb.Stage.VALID and epoch is not None:
        print("Epoch %d complete" % epoch)
        print("Train loss: %.2f" % self.train_loss)
    if stage != sb.Stage.TRAIN:
        print(stage, "loss: %.2f" % stage_loss)
        print(stage, "PER: %.2f" % self.per_metrics.summarize("error_rate"))