class_docstr: The Attentional RNN encoder-decoder model
  
  Arguments
  ---------
  enc: torch.nn.Module
      the encoder module
  encoder_emb: torch.nn.Module
      the encoder_embedding_module
  emb: torch.nn.Module
      the embedding module
  dec: torch.nn.Module
      the decoder module
  lin: torch.nn.Module
      the linear module
  out: torch.nn.Module
      the output layer (typically log_softmax)
  use_word_emb: bool
      whether or not to use word embedding
  bos_token: int
      the index of teh Beginning-of-Sentence token
  word_emb_enc: nn.Module
      a module to encode word embeddings
  
  
  Returns
  -------
  result: tuple
      a (p_seq, char_lens) tuple
docstr: Computes the forward pass
  
  Arguments
  ---------
  grapheme_encoded: torch.Tensor
      graphemes encoded as a Torch tensor
  
  phn_encoded: torch.Tensor
      the encoded phonemes
  
  word_emb: torch.Tensor
      word embeddings (optional)
  
  Returns
  -------
  p_seq: torch.Tensor
      a (batch x position x token) tensor of token probabilities in each
      position
  char_lens: torch.Tensor
      a tensor of character sequence lengths
  encoder_out:
      the raw output of the encoder
docstr_tok: ["Computes","the","forward","pass","Arguments","--","--","--","--","-","grapheme_encoded",":","torch.Tensor","graphemes","encoded","as","a","Torch","tensor","phn_encoded",":","torch.Tensor","the","encoded","phonemes","word_emb",":","torch.Tensor","word","embeddings","(","optional",")","Returns","--","--","--","-","p_seq",":","torch.Tensor","a","(","batch","x","position","x","token",")","tensor","of","token","probabilities","in","each","position","char_lens",":","torch.Tensor","a","tensor","of","character","sequence","lengths","encoder_out",":","the","raw","output","of","the","encoder"]
code: def forward(
      self, grapheme_encoded, phn_encoded=None, word_emb=None, **kwargs
  ):
      """Computes the forward pass
  
      Arguments
      ---------
      grapheme_encoded: torch.Tensor
          graphemes encoded as a Torch tensor
  
      phn_encoded: torch.Tensor
          the encoded phonemes
  
      word_emb: torch.Tensor
          word embeddings (optional)
  
      Returns
      -------
      p_seq: torch.Tensor
          a (batch x position x token) tensor of token probabilities in each
          position
      char_lens: torch.Tensor
          a tensor of character sequence lengths
      encoder_out:
          the raw output of the encoder
      """
  
      chars, char_lens = grapheme_encoded
      if phn_encoded is None:
          phn_bos = get_dummy_phonemes(chars.size(0), chars.device)
      else:
          phn_bos, _ = phn_encoded
  
      emb_char = self.encoder_emb(chars)
      if self.use_word_emb:
          emb_char = _apply_word_emb(
              self.word_emb_enc, emb_char, word_emb
          )
  
      encoder_out, _ = self.enc(emb_char)
      e_in = self.emb(phn_bos)
      h, w = self.dec(e_in, encoder_out, char_lens)
      logits = self.lin(h)
      p_seq = self.out(logits)
  
      return p_seq, char_lens, encoder_out, w
  
imports: from speechbrain.lobes.models.transformer.Transformer import TransformerInterface, get_lookahead_mask, get_key_padding_mask
  import torch
  from torch import nn
  from speechbrain.nnet.linear import Linear
  from speechbrain.nnet import normalization
label_desc: Use image node_id 2 for calling the AttentionSeq2Seq obj's underlying member method code with example usage: obj.forward(grapheme_encoded, phn_encoded, word_emb) and returns: p_seq,  char_lens,  encoder_out,  w