class_docstr: WaveGlow model (https://arxiv.org/abs/1811.00002) that is used to generate audio from mel spectrogram.
class_docstr_tok: ["WaveGlow","model","(","https",":","\/\/arxiv.org\/abs\/1811.00002",")","that","is","used","to","generate","audio","from","mel","spectrogram","."]
code: def validation_step(self, batch, batch_idx):
      self.mode = OperationMode.validation
      audio, audio_len = batch
      z, log_s_list, log_det_W_list, audio_pred, spec, spec_len = self(
          audio=audio, audio_len=audio_len, run_inverse=(batch_idx == 0)
      )
      loss = self.loss(
          z=z,
          log_s_list=log_s_list,
          log_det_W_list=log_det_W_list,
          sigma=self.sigma,
      )
      loss = {
          "val_loss": loss,
          "audio_pred": audio_pred,
          "mel_target": spec,
          "mel_len": spec_len,
      }
      self.validation_step_outputs.append(loss)
      return loss
  
imports: import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig, open_dict
  from pytorch_lightning.loggers import TensorBoardLogger
  from nemo.collections.tts.losses.waveglowloss import WaveGlowLoss
  from nemo.collections.tts.models.base import GlowVocoder
  from nemo.collections.tts.parts.utils.helpers import OperationMode, waveglow_log_to_tb_func
  from nemo.core.classes import Exportable
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types.elements import AudioSignal, LengthsType, LogDeterminantType, MelSpectrogramType, NormalDistributionSamplesType, VoidType
  from nemo.core.neural_types.neural_type import NeuralType
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 6 for calling the WaveGlowModel obj's underlying member method code with example usage: obj.validation_step(batch, batch_idx) and returns: loss