code: def __init__(
      self,
      *,
      tedlium_path: str,
      sp_model_path: str,
      global_stats_path: str,
  ):
      super().__init__()
  
      self.model = emformer_rnnt_base(num_symbols=501)
      self.loss = torchaudio.transforms.RNNTLoss(
          reduction="mean", clamp=1.0
      )
      self.optimizer = torch.optim.Adam(
          self.model.parameters(), lr=5e-4, betas=(0.9, 0.999), eps=1e-8
      )
      self.warmup_lr_scheduler = WarmupLR(self.optimizer, 10000)
  
      self.train_data_pipeline = torch.nn.Sequential(
          FunctionalModule(piecewise_linear_log),
          GlobalStatsNormalization(global_stats_path),
          FunctionalModule(partial(torch.transpose, dim0=1, dim1=2)),
          torchaudio.transforms.FrequencyMasking(27),
          torchaudio.transforms.FrequencyMasking(27),
          torchaudio.transforms.TimeMasking(100, p=0.2),
          torchaudio.transforms.TimeMasking(100, p=0.2),
          FunctionalModule(
              partial(torch.nn.functional.pad, pad=(0, 4))
          ),
          FunctionalModule(partial(torch.transpose, dim0=1, dim1=2)),
      )
      self.valid_data_pipeline = torch.nn.Sequential(
          FunctionalModule(piecewise_linear_log),
          GlobalStatsNormalization(global_stats_path),
          FunctionalModule(partial(torch.transpose, dim0=1, dim1=2)),
          FunctionalModule(
              partial(torch.nn.functional.pad, pad=(0, 4))
          ),
          FunctionalModule(partial(torch.transpose, dim0=1, dim1=2)),
      )
  
      self.tedlium_path = tedlium_path
  
      self.sp_model = spm.SentencePieceProcessor(
          model_file=sp_model_path
      )
      self.blank_idx = self.sp_model.get_piece_size()
  
imports: import os
  from functools import partial
  from typing import List
  import sentencepiece
  import torch
  import torchaudio
  from common import Batch, batch_by_token_count, FunctionalModule, GlobalStatsNormalization, piecewise_linear_log, post_process_hypos, spectrogram_transform, WarmupLR
  from pytorch_lightning import LightningModule
  from torchaudio.models import emformer_rnnt_base, RNNTBeamSearch
label_desc: Use image node_id 1 to create a new TEDLIUM3RNNTModule object from inherited base classes: LightningModule with example: obj = TEDLIUM3RNNTModule()