class_docstr: Double optimizer class for the Capacitron model.
class_docstr_tok: ["Double","optimizer","class","for","the","Capacitron","model","."]
code: def __init__(self, config: dict, model_params: Generator) -> None:
      (
          self.primary_params,
          self.secondary_params,
      ) = self.split_model_parameters(model_params)
  
      optimizer_names = list(config.optimizer_params.keys())
      optimizer_parameters = list(config.optimizer_params.values())
  
      self.primary_optimizer = get_optimizer(
          optimizer_names[0],
          optimizer_parameters[0],
          config.lr,
          parameters=self.primary_params,
      )
  
      self.secondary_optimizer = get_optimizer(
          optimizer_names[1],
          self.extract_optimizer_parameters(optimizer_parameters[1]),
          optimizer_parameters[1]["lr"],
          parameters=self.secondary_params,
      )
  
      self.param_groups = self.primary_optimizer.param_groups
  
file_path: TTS/TTS/utils/capacitron_optimizer.py
imports: from typing import Generator
  from trainer.trainer_utils import get_optimizer
label_desc: Use image node_id 1 to create a new CapacitronOptimizer object  with example: obj = CapacitronOptimizer(config, model_params)