docstr: Called during ``on_fit_start()``, initialize optimizers
  after parameters are fully configured (e.g. DDP, jit).
docstr_tok: ["Called","during","``","on_fit_start","(",")","``",",","initialize","optimizers","after","parameters","are","fully","configured","(","e.g",".","DDP",",","jit",")","."]
code: def init_optimizers(self):
      """Called during ``on_fit_start()``, initialize optimizers
      after parameters are fully configured (e.g. DDP, jit).
      """
      if self.opt_class is not None:
          (
              opt_g_class,
              opt_d_class,
              sch_g_class,
              sch_d_class,
          ) = self.opt_class
  
          self.optimizer_g = opt_g_class(
              self.modules.generator.parameters()
          )
          self.optimizer_d = opt_d_class(
              self.modules.discriminator.parameters()
          )
          self.scheduler_g = sch_g_class(self.optimizer_g)
          self.scheduler_d = sch_d_class(self.optimizer_d)
  
          if self.checkpointer is not None:
              self.checkpointer.add_recoverable(
                  "optimizer_g", self.optimizer_g
              )
              self.checkpointer.add_recoverable(
                  "optimizer_d", self.optimizer_d
              )
              self.checkpointer.add_recoverable(
                  "scheduler_g", self.scheduler_d
              )
              self.checkpointer.add_recoverable(
                  "scheduler_d", self.scheduler_d
              )
  
          self.optimizers_dict = {
              "optimizer_g": self.optimizer_g,
              "optimizer_d": self.optimizer_d,
          }
  
file_path: speechbrain/recipes/LibriTTS/vocoder/hifigan/train.py
imports: import sys
  import torch
  from hyperpyyaml import load_hyperpyyaml
  import speechbrain
  from speechbrain.utils.data_utils import scalarize
  import torchaudio
  import os
label_desc: Use image node_id 6 for calling the HifiGanBrain obj's underlying member method code with example usage: obj.init_optimizers() without return types