class_docstr: Recurrent neural network transducer (RNN-T) prediction network.
  
  Args:
      num_symbols (int): size of target token lexicon.
      output_dim (int): feature dimension of each output sequence element.
      symbol_embedding_dim (int): dimension of each target token embedding.
      num_lstm_layers (int): number of LSTM layers to instantiate.
      lstm_hidden_dim (int): output dimension of each LSTM layer.
      lstm_layer_norm (bool, optional): if ``True``, enables layer normalization
          for LSTM layers. (Default: ``False``)
      lstm_layer_norm_epsilon (float, optional): value of epsilon to use in
          LSTM layer normalization layers. (Default: 1e-5)
      lstm_dropout (float, optional): LSTM dropout probability. (Default: 0.0)
class_docstr_tok: ["Recurrent","neural","network","transducer","(","RNN-T",")","prediction","network",".","Args",":","num_symbols","(","int",")",":","size","of","target","token","lexicon",".","output_dim","(","int",")",":","feature","dimension","of","each","output","sequence","element",".","symbol_embedding_dim","(","int",")",":","dimension","of","each","target","token","embedding",".","num_lstm_layers","(","int",")",":","number","of","LSTM","layers","to","instantiate",".","lstm_hidden_dim","(","int",")",":","output","dimension","of","each","LSTM","layer",".","lstm_layer_norm","(","bool",",","optional",")",":","if","``","True","``",",","enables","layer","normalization","for","LSTM","layers",".","(","Default",":","``","False","``",")","lstm_layer_norm_epsilon","(","float",",","optional",")",":","value","of","epsilon","to","use","in","LSTM","layer","normalization","layers",".","(","Default",":","1e-5",")","lstm_dropout","(","float",",","optional",")",":","LSTM","dropout","probability",".","(","Default",":","0.0",")"]
docstr: Forward pass.
  
  B: batch size;
  U: maximum sequence length in batch;
  D: feature dimension of each input sequence element.
  
  Args:
      input (torch.Tensor): target sequences, with shape `(B, U)` and each element
          mapping to a target symbol, i.e. in range `[0, num_symbols)`.
      lengths (torch.Tensor): with shape `(B,)` and i-th element representing
          number of valid frames for i-th batch element in ``input``.
      state (List[List[torch.Tensor]] or None, optional): list of lists of tensors
          representing internal state generated in preceding invocation
          of ``forward``. (Default: ``None``)
  
  Returns:
      (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]):
          torch.Tensor
              output encoding sequences, with shape `(B, U, output_dim)`
          torch.Tensor
              output lengths, with shape `(B,)` and i-th element representing
              number of valid elements for i-th batch element in output encoding sequences.
          List[List[torch.Tensor]]
              output states; list of lists of tensors
              representing internal state generated in current invocation of ``forward``.
docstr_tok: ["Forward","pass",".","B",":","batch","size",";","U",":","maximum","sequence","length","in","batch",";","D",":","feature","dimension","of","each","input","sequence","element",".","Args",":","input","(","torch.Tensor",")",":","target","sequences",",","with","shape","`","(","B",",","U",")","`","and","each","element","mapping","to","a","target","symbol",",","i.e",".","in","range","`","[","0",",","num_symbols",")","`",".","lengths","(","torch.Tensor",")",":","with","shape","`","(","B",",",")","`","and","i-th","element","representing","number","of","valid","frames","for","i-th","batch","element","in","``","input","``",".","state","(","List","[","List","[","torch.Tensor","]","]","or","None",",","optional",")",":","list","of","lists","of","tensors","representing","internal","state","generated","in","preceding","invocation","of","``","forward","``",".","(","Default",":","``","None","``",")","Returns",":","(","torch.Tensor",",","torch.Tensor",",","List","[","List","[","torch.Tensor","]","]",")",":","torch.Tensor","output","encoding","sequences",",","with","shape","`","(","B",",","U",",","output_dim",")","`","torch.Tensor","output","lengths",",","with","shape","`","(","B",",",")","`","and","i-th","element","representing","number","of","valid","elements","for","i-th","batch","element","in","output","encoding","sequences",".","List","[","List","[","torch.Tensor","]","]","output","states",";","list","of","lists","of","tensors","representing","internal","state","generated","in","current","invocation","of","``","forward","``","."]
code: def forward(
      self,
      input: torch.Tensor,
      lengths: torch.Tensor,
      state: Optional[List[List[torch.Tensor]]] = None,
  ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]:
      r"""Forward pass.
  
      B: batch size;
      U: maximum sequence length in batch;
      D: feature dimension of each input sequence element.
  
      Args:
          input (torch.Tensor): target sequences, with shape `(B, U)` and each element
              mapping to a target symbol, i.e. in range `[0, num_symbols)`.
          lengths (torch.Tensor): with shape `(B,)` and i-th element representing
              number of valid frames for i-th batch element in ``input``.
          state (List[List[torch.Tensor]] or None, optional): list of lists of tensors
              representing internal state generated in preceding invocation
              of ``forward``. (Default: ``None``)
  
      Returns:
          (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]):
              torch.Tensor
                  output encoding sequences, with shape `(B, U, output_dim)`
              torch.Tensor
                  output lengths, with shape `(B,)` and i-th element representing
                  number of valid elements for i-th batch element in output encoding sequences.
              List[List[torch.Tensor]]
                  output states; list of lists of tensors
                  representing internal state generated in current invocation of ``forward``.
      """
      input_tb = input.permute(1, 0)
      embedding_out = self.embedding(input_tb)
      input_layer_norm_out = self.input_layer_norm(embedding_out)
  
      lstm_out = input_layer_norm_out
      state_out: List[List[torch.Tensor]] = []
      for layer_idx, lstm in enumerate(self.lstm_layers):
          lstm_out, lstm_state_out = lstm(
              lstm_out, None if state is None else state[layer_idx]
          )
          lstm_out = self.dropout(lstm_out)
          state_out.append(lstm_state_out)
  
      linear_out = self.linear(lstm_out)
      output_layer_norm_out = self.output_layer_norm(linear_out)
      return output_layer_norm_out.permute(1, 0, 2), lengths, state_out
  
imports: from abc import ABC, abstractmethod
  from typing import List, Optional, Tuple
  import torch
  from torchaudio.models import Emformer
label_desc: Use image node_id 2 for calling the _Predictor obj's underlying member method code with example usage: obj.forward(input, lengths, state) and returns: output_layer_norm_out,  lengths,  state_out