docstr: Initialize the right optimizer on the training start
docstr_tok: ["Initialize","the","right","optimizer","on","the","training","start"]
code: def on_fit_start(self):
      """Initialize the right optimizer on the training start"""
      super().on_fit_start()
  
      # if the model is resumed from stage two, reinitialize the optimizer
      current_epoch = self.hparams.epoch_counter.current
      current_optimizer = self.optimizer
      if current_epoch > self.hparams.stage_one_epochs:
          del self.optimizer
          self.optimizer = self.hparams.SGD(self.modules.parameters())
  
          # Load latest checkpoint to resume training if interrupted
          if self.checkpointer is not None:
              # do not reload the weights if training is interrupted right before stage 2
              group = current_optimizer.param_groups[0]
              if "momentum" not in group:
                  return
  
              self.checkpointer.recover_if_possible()
  
file_path: speechbrain/recipes/Fisher-Callhome-Spanish/ST/transformer/train.py
imports: import sys
  import torch
  import logging
  import speechbrain
  from sacremoses import MosesDetokenizer
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.distributed import run_on_main
label_desc: Use image node_id 8 for calling the ST obj's underlying member method code with example usage: obj.on_fit_start() without return types