docstr: Gets called at the end of a stage.
code: def on_stage_end(self, stage, stage_loss, epoch=None):
      """Gets called at the end of a stage."""
      if self.hparams.use_tensorboard:
          if stage == sb.Stage.TRAIN:
              self.hparams.train_logger.log_stats(
                  {"Epoch": epoch},
                  train_stats={"loss": self.mse_metric.scores},
              )
          elif stage == sb.Stage.VALID:
              self.hparams.train_logger.log_stats(
                  {"Epoch": epoch},
                  valid_stats={"loss": self.mse_metric.scores},
              )
          if stage == sb.Stage.TEST:
              self.hparams.train_logger.log_stats(
                  {}, test_stats={"loss": self.mse_metric.scores}
              )
  
      if stage == sb.Stage.TRAIN:
          self.train_loss = stage_loss
      if stage == sb.Stage.VALID:
          print("Completed epoch %d" % epoch)
          print("Train loss: %.3f" % self.train_loss)
          print("Valid loss: %.3f" % stage_loss)
      if stage == sb.Stage.TEST:
          print("Test loss: %.3f" % stage_loss)
  
file_path: speechbrain/tests/integration/autoencoder/example_auto_experiment.py
imports: import pathlib
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 4 for calling the AutoBrain obj's underlying member method code with example usage: obj.on_stage_end(stage, stage_loss, epoch) without return types