class_docstr: Base class for encoder decoder RNNT-based models.
class_docstr_tok: ["Base","class","for","encoder","decoder","RNNT-based","models","."]
code: def validation_pass(self, batch, batch_idx, dataloader_idx=0):
      signal, signal_len, transcript, transcript_len = batch
  
      # forward() only performs encoder forward
      if isinstance(batch, DALIOutputs) and batch.has_processed_signal:
          encoded, encoded_len = self.forward(
              processed_signal=signal,
              processed_signal_length=signal_len,
          )
      else:
          encoded, encoded_len = self.forward(
              input_signal=signal, input_signal_length=signal_len
          )
      del signal
  
      tensorboard_logs = {}
  
      # If experimental fused Joint-Loss-WER is not used
      if not self.joint.fuse_loss_wer:
          if self.compute_eval_loss:
              decoder, target_length, states = self.decoder(
                  targets=transcript, target_length=transcript_len
              )
              joint = self.joint(
                  encoder_outputs=encoded, decoder_outputs=decoder
              )
  
              loss_value = self.loss(
                  log_probs=joint,
                  targets=transcript,
                  input_lengths=encoded_len,
                  target_lengths=target_length,
              )
  
              tensorboard_logs["val_loss"] = loss_value
  
          self.wer.update(
              predictions=encoded,
              predictions_lengths=encoded_len,
              targets=transcript,
              targets_lengths=transcript_len,
          )
          wer, wer_num, wer_denom = self.wer.compute()
          self.wer.reset()
  
          tensorboard_logs["val_wer_num"] = wer_num
          tensorboard_logs["val_wer_denom"] = wer_denom
          tensorboard_logs["val_wer"] = wer
  
      else:
          # If experimental fused Joint-Loss-WER is used
          compute_wer = True
  
          if self.compute_eval_loss:
              decoded, target_len, states = self.decoder(
                  targets=transcript, target_length=transcript_len
              )
          else:
              decoded = None
              target_len = transcript_len
  
          # Fused joint step
          loss_value, wer, wer_num, wer_denom = self.joint(
              encoder_outputs=encoded,
              decoder_outputs=decoded,
              encoder_lengths=encoded_len,
              transcripts=transcript,
              transcript_lengths=target_len,
              compute_wer=compute_wer,
          )
  
          if loss_value is not None:
              tensorboard_logs["val_loss"] = loss_value
  
          tensorboard_logs["val_wer_num"] = wer_num
          tensorboard_logs["val_wer_denom"] = wer_denom
          tensorboard_logs["val_wer"] = wer
  
      self.log(
          "global_step",
          torch.tensor(self.trainer.global_step, dtype=torch.float32),
      )
  
      return tensorboard_logs
  
imports: import copy
  import json
  import os
  import tempfile
  from math import ceil
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from tqdm.auto import tqdm
  from nemo.collections.asr.data import audio_to_text_dataset
  from nemo.collections.asr.data.audio_to_text_dali import AudioToCharDALIDataset, DALIOutputs
  from nemo.collections.asr.data.audio_to_text_lhotse import LhotseSpeechToTextBpeDataset
  from nemo.collections.asr.losses.rnnt import RNNTLoss, resolve_rnnt_default_loss_name
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models.asr_model import ASRModel, ExportableEncDecModel
  from nemo.collections.asr.modules.rnnt import RNNTDecoderJoint
  from nemo.collections.asr.parts.mixins import ASRModuleMixin
  from nemo.collections.asr.parts.submodules.rnnt_decoding import RNNTDecoding, RNNTDecodingConfig
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.common.data.lhotse import get_lhotse_dataloader_from_config
  from nemo.collections.common.parts.preprocessing.parsers import make_parser
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.neural_types import AcousticEncodedRepresentation, AudioSignal, LengthsType, NeuralType, SpectrogramType
  from nemo.utils import logging
label_desc: Use image node_id 16 for calling the EncDecRNNTModel obj's underlying member method code with example usage: obj.validation_pass(batch, batch_idx, dataloader_idx) and returns: tensorboard_logs