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 configure_callbacks(self):
      if not self.log_config:
          return []
  
      sample_ds_class = self.log_config.dataset._target_
      if (
          sample_ds_class
          != "nemo.collections.tts.data.vocoder_dataset.VocoderDataset"
      ):
          raise ValueError(
              f"Sample logging only supported for VocoderDataset, got {sample_ds_class}"
          )
  
      data_loader = self._setup_test_dataloader(self.log_config)
      generators = instantiate(self.log_config.generators)
      log_dir = (
          Path(self.log_config.log_dir)
          if self.log_config.log_dir
          else None
      )
      log_callback = LoggingCallback(
          generators=generators,
          data_loader=data_loader,
          log_epochs=self.log_config.log_epochs,
          epoch_frequency=self.log_config.epoch_frequency,
          output_dir=log_dir,
          loggers=self.trainer.loggers,
          log_tensorboard=self.log_config.log_tensorboard,
          log_wandb=self.log_config.log_wandb,
      )
  
      return [log_callback]
  
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 19 for calling the HifiGanModel obj's underlying member method code with example usage: obj.configure_callbacks() and returns: list, list