class_docstr: HiFi-GAN model (https://arxiv.org/abs/2010.05646) that is used to generate audio from mel spectrogram.
class_docstr_tok: ["HiFi-GAN","model","(","https",":","\/\/arxiv.org\/abs\/2010.05646",")","that","is","used","to","generate","audio","from","mel","spectrogram","."]
code: def max_steps(self):
      if "max_steps" in self._cfg:
          return self._cfg.get("max_steps")
  
      if "max_epochs" not in self._cfg:
          raise ValueError("Must specify 'max_steps' or 'max_epochs'.")
  
      if "steps_per_epoch" in self._cfg:
          return self._cfg.max_epochs * self._cfg.steps_per_epoch
  
      return compute_max_steps(
          max_epochs=self._cfg.max_epochs,
          accumulate_grad_batches=self.trainer.accumulate_grad_batches,
          limit_train_batches=self.trainer.limit_train_batches,
          num_workers=get_num_workers(self.trainer),
          num_samples=len(self._train_dl.dataset),
          batch_size=get_batch_size(self._train_dl),
          drop_last=self._train_dl.drop_last,
      )
  
imports: import itertools
  from pathlib import Path
  import torch
  import torch.nn.functional
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning.loggers.wandb import WandbLogger
  from nemo.collections.tts.losses.hifigan_losses import DiscriminatorLoss, FeatureMatchingLoss, GeneratorLoss
  from nemo.collections.tts.models.base import Vocoder
  from nemo.collections.tts.modules.hifigan_modules import MultiPeriodDiscriminator, MultiScaleDiscriminator
  from nemo.collections.tts.parts.utils.callbacks import LoggingCallback
  from nemo.collections.tts.parts.utils.helpers import get_batch_size, get_num_workers, plot_spectrogram_to_numpy
  from nemo.core.classes import Exportable
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types.elements import AudioSignal, MelSpectrogramType
  from nemo.core.neural_types.neural_type import NeuralType
  from nemo.core.optim.lr_scheduler import compute_max_steps, prepare_lr_scheduler
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 2 for calling the HifiGanModel obj's underlying member method code with example usage: obj.max_steps() and returns: compute_max_steps, self, unknown