docstr: Gets called at the beginning of each epoch
docstr_tok: ["Gets","called","at","the","beginning","of","each","epoch"]
code: def on_stage_start(self, stage, epoch=None):
      """Gets called at the beginning of each epoch"""
      self.loss_metric_d1 = MetricStats(
          metric=self.hparams.compute_cost["d1"]
      )
      self.loss_metric_d2 = MetricStats(
          metric=self.hparams.compute_cost["d2"]
      )
      self.loss_metric_g3 = MetricStats(
          metric=self.hparams.compute_cost["g3"]
      )
      self.stoi_metric = MetricStats(metric=stoi_loss)
  
      # Define function taking (prediction, target) for parallel eval
      def pesq_eval(pred_wav, target_wav):
          """Computes the PESQ evaluation metric"""
          return pesq(
              fs=hparams["sample_rate"],
              ref=target_wav.numpy().squeeze(),
              deg=pred_wav.numpy().squeeze(),
              mode="wb",
          )
  
      if stage != sb.Stage.TRAIN:
          self.pesq_metric = MetricStats(
              metric=pesq_eval, batch_eval=False, n_jobs=1
          )
  
imports: import os
  import sys
  import torch
  import torchaudio
  import speechbrain
  from pesq import pesq
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.metric_stats import MetricStats
  from speechbrain.nnet.loss.stoi_loss import stoi_loss
  from speechbrain.utils.distributed import run_on_main
label_desc: Use image node_id 10 for calling the SEBrain obj's underlying member method code with example usage: obj.on_stage_start(stage, epoch) and returns: pesq