class_docstr: Base class for encoder decoder RNNT-based models.
docstr: Changes decoding strategy used during RNNT decoding process.
  
  Args:
      decoding_cfg: A config for the decoder, which is optional. If the decoding type
          needs to be changed (from say Greedy to Beam decoding etc), the config can be passed here.
docstr_tok: ["Changes","decoding","strategy","used","during","RNNT","decoding","process",".","Args",":","decoding_cfg",":","A","config","for","the","decoder",",","which","is","optional",".","If","the","decoding","type","needs","to","be","changed","(","from","say","Greedy","to","Beam","decoding","etc",")",",","the","config","can","be","passed","here","."]
code: def change_decoding_strategy(self, decoding_cfg: DictConfig):
      """
      Changes decoding strategy used during RNNT decoding process.
  
      Args:
          decoding_cfg: A config for the decoder, which is optional. If the decoding type
              needs to be changed (from say Greedy to Beam decoding etc), the config can be passed here.
      """
      if decoding_cfg is None:
          # Assume same decoding config as before
          logging.info(
              "No `decoding_cfg` passed when changing decoding strategy, using internal config"
          )
          decoding_cfg = self.cfg.decoding
  
      # Assert the decoding config with all hyper parameters
      decoding_cls = OmegaConf.structured(RNNTDecodingConfig)
      decoding_cls = OmegaConf.create(
          OmegaConf.to_container(decoding_cls)
      )
      decoding_cfg = OmegaConf.merge(decoding_cls, decoding_cfg)
  
      self.decoding = RNNTDecoding(
          decoding_cfg=decoding_cfg,
          decoder=self.decoder,
          joint=self.joint,
          vocabulary=self.joint.vocabulary,
      )
  
      self.wer = WER(
          decoding=self.decoding,
          batch_dim_index=self.wer.batch_dim_index,
          use_cer=self.wer.use_cer,
          log_prediction=self.wer.log_prediction,
          dist_sync_on_step=True,
      )
  
      # Setup fused Joint step
      if self.joint.fuse_loss_wer or (
          self.decoding.joint_fused_batch_size is not None
          and self.decoding.joint_fused_batch_size > 0
      ):
          self.joint.set_loss(self.loss)
          self.joint.set_wer(self.wer)
  
      # Update config
      with open_dict(self.cfg.decoding):
          self.cfg.decoding = decoding_cfg
  
      logging.info(
          f"Changed decoding strategy to \n{OmegaConf.to_yaml(self.cfg.decoding)}"
      )
  
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.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
  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.multimodal.speech_cv.data import video_to_text_dataset
  from nemo.core.classes import Exportable
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.neural_types import AcousticEncodedRepresentation, LengthsType, NeuralType, VideoSignal
  from nemo.utils import logging
label_desc: Use image node_id 6 for calling the VisualEncDecRNNTModel obj's underlying member method code with example usage: obj.change_decoding_strategy(decoding_cfg) without return types