class_docstr: Base class for encoder decoder CTC-based models.
class_docstr_tok: ["Base","class","for","encoder","decoder","CTC-based","models","."]
code: def validation_step(self, batch, batch_idx, dataloader_idx=0):
      if self.is_interctc_enabled():
          AccessMixin.set_access_enabled(access_enabled=True)
  
      video_signal, video_signal_len, transcript, transcript_len = batch
      log_probs, encoded_len, predictions = self.forward(
          input_video_signal=video_signal,
          input_video_signal_length=video_signal_len,
      )
  
      loss_value = self.loss(
          log_probs=log_probs,
          targets=transcript,
          input_lengths=encoded_len,
          target_lengths=transcript_len,
      )
      loss_value, metrics = self.add_interctc_losses(
          loss_value,
          transcript,
          transcript_len,
          compute_wer=True,
          log_wer_num_denom=True,
          log_prefix="val_",
      )
  
      self.wer.update(
          predictions=log_probs,
          targets=transcript,
          target_lengths=transcript_len,
          predictions_lengths=encoded_len,
      )
      wer, wer_num, wer_denom = self.wer.compute()
      self.wer.reset()
      metrics.update(
          {
              "val_loss": loss_value,
              "val_wer_num": wer_num,
              "val_wer_denom": wer_denom,
              "val_wer": wer,
          }
      )
  
      self.log(
          "global_step",
          torch.tensor(self.trainer.global_step, dtype=torch.float32),
      )
  
      # Reset access registry
      if AccessMixin.is_access_enabled():
          AccessMixin.reset_registry(self)
  
      return metrics
  
imports: import copy
  import json
  import os
  import tempfile
  from math import ceil
  from typing import Dict, List, Optional, 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.losses.ctc import CTCLoss
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models.asr_model import ASRModel, ExportableEncDecModel
  from nemo.collections.asr.parts.mixins import ASRModuleMixin, InterCTCMixin
  from nemo.collections.asr.parts.submodules.ctc_decoding import CTCDecoding, CTCDecodingConfig
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.multimodal.speech_cv.data import video_to_text_dataset
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.neural_types import LabelsType, LengthsType, LogprobsType, NeuralType, VideoSignal
  from nemo.utils import logging
label_desc: Use image node_id 14 for calling the VisualEncDecCTCModel obj's underlying member method code with example usage: obj.validation_step(batch, batch_idx, dataloader_idx) and returns: metrics