docstr: src_tokens: padded tensor (B, T, C * feat)
  src_lengths: tensor of original lengths of input utterances (B,)
docstr_tok: ["src_tokens",":","padded","tensor","(","B",",","T",",","C","*","feat",")","src_lengths",":","tensor","of","original","lengths","of","input","utterances","(","B",",",")"]
code: def forward(self, src_tokens, src_lengths, **kwargs):
      """
      src_tokens: padded tensor (B, T, C * feat)
      src_lengths: tensor of original lengths of input utterances (B,)
      """
      B, T, _ = src_tokens.size()
      x = src_tokens.transpose(
          1, 2
      ).contiguous()  # (B, feat, T) assuming C == 1
  
      for layer_idx in range(len(self.conv_layers)):
          x = self.conv_layers[layer_idx](x)
          x = F.glu(x, dim=1)
          x = self.dropouts[layer_idx](x)
  
      x = x.transpose(1, 2).contiguous()  # (B, T, 908)
      x = self.linear_layers[0](x)
      x = F.glu(x, dim=2)
      x = self.dropouts[-1](x)
      x = self.linear_layers[1](x)
  
      assert x.size(0) == B
      assert x.size(1) == T
  
      encoder_out = x.transpose(0, 1)  # (T, B, vocab_size)
  
      # need to debug this -- find a simpler/elegant way in pytorch APIs
      encoder_padding_mask = (
          torch.arange(T).view(1, T).expand(B, -1).to(x.device)
          >= src_lengths.view(B, 1).expand(-1, T)
      ).t()  # (B x T) -> (T x B)
  
      return {
          "encoder_out": encoder_out,  # (T, B, vocab_size)
          "encoder_padding_mask": encoder_padding_mask,  # (T, B)
      }
  
file_path: fairseq/examples/speech_recognition/models/w2l_conv_glu_enc.py
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq.models import FairseqEncoder, FairseqEncoderModel, register_model, register_model_architecture
  from fairseq.modules.fairseq_dropout import FairseqDropout
label_desc: Use image node_id 2 for calling the W2lConvGluEncoder obj's underlying member method code with example usage: obj.forward(src_tokens, src_lengths) and returns: dict