class_docstr: Encoder decoder CTC-based models with Byte Pair Encoding.
docstr: Changes decoding strategy used during CTC 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","CTC","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 CTC 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(CTCBPEDecodingConfig)
      decoding_cls = OmegaConf.create(
          OmegaConf.to_container(decoding_cls)
      )
      decoding_cfg = OmegaConf.merge(decoding_cls, decoding_cfg)
  
      self.decoding = CTCBPEDecoding(
          decoding_cfg=decoding_cfg,
          tokenizer=self.tokenizer,
      )
  
      self.wer = WER(
          decoding=self.decoding,
          use_cer=self.wer.use_cer,
          log_prediction=self.wer.log_prediction,
          dist_sync_on_step=True,
      )
  
      self.decoder.temperature = decoding_cfg.get("temperature", 1.0)
  
      # 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 os
  from typing import Dict, List, Optional, Union
  import torch
  from omegaconf import DictConfig, ListConfig, OmegaConf, open_dict
  from nemo.collections.asr.data import audio_to_text_dataset
  from nemo.collections.asr.data.audio_to_text_dali import AudioToBPEDALIDataset
  from nemo.collections.asr.data.audio_to_text_lhotse import LhotseSpeechToTextBpeDataset
  from nemo.collections.asr.losses.ctc import CTCLoss
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models.ctc_models import EncDecCTCModel
  from nemo.collections.asr.parts.mixins import ASRBPEMixin
  from nemo.collections.asr.parts.submodules.ctc_decoding import CTCBPEDecoding, CTCBPEDecodingConfig
  from nemo.collections.common.data.lhotse import get_lhotse_dataloader_from_config
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 5 for calling the EncDecCTCModelBPE obj's underlying member method code with example usage: obj.change_decoding_strategy(decoding_cfg) without return types