docstr: Gets called at the end of a stage.
docstr_tok: ["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 stage == sb.Stage.TRAIN:
          self.train_loss = stage_loss
      elif stage == sb.Stage.VALID:
          print("Completed epoch %d" % epoch)
          print("Train SI-SNR: %.3f" % -self.train_loss)
          print("Valid SI-SNR: %.3f" % -stage_loss)
      elif stage == sb.Stage.TEST:
          print("Test SI-SNR: %.3f" % -stage_loss)
  
file_path: speechbrain/tests/integration/separation/example_conv_tasnet.py
imports: import torch
  import pathlib
  import speechbrain
  import torch.nn.functional
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.nnet.losses import get_si_snr_with_pitwrapper
label_desc: Use image node_id 5 for calling the SepBrain obj's underlying member method code with example usage: obj.on_stage_end(stage, stage_loss, epoch) without return types