class_docstr: Convolutional subsampler: a stack of 2D convolution based on ESPnet implementation
  (https://github.com/espnet/espnet)
  
  Args:
      input_channels (int): the number of input channels
      input_feat_per_channel (int): encoder input dimension per input channel
      conv_out_channels (int): the number of output channels of conv layer
      encoder_embed_dim (int): encoder dimentions
class_docstr_tok: ["Convolutional","subsampler",":","a","stack","of","2D","convolution","based","on","ESPnet","implementation","(","https",":","\/\/github.com\/espnet\/espnet",")","Args",":","input_channels","(","int",")",":","the","number","of","input","channels","input_feat_per_channel","(","int",")",":","encoder","input","dimension","per","input","channel","conv_out_channels","(","int",")",":","the","number","of","output","channels","of","conv","layer","encoder_embed_dim","(","int",")",":","encoder","dimentions"]
code: def forward(self, src_tokens, src_lengths):
      B, T_i, C = src_tokens.size()
      x = src_tokens.view(B, T_i, 1, C).transpose(1, 2).contiguous()
      x = self.conv(x)
      B, _, T_o, _ = x.size()
      x = (
          x.transpose(1, 2)
          .transpose(0, 1)
          .contiguous()
          .view(T_o, B, -1)
      )
      x = self.out(x)
  
      subsampling_factor = int(T_i * 1.0 / T_o + 0.5)
      input_len_0 = (
          (src_lengths.float() / subsampling_factor).ceil().long()
      )
      input_len_1 = x.size(0) * torch.ones(
          [src_lengths.size(0)]
      ).long().to(input_len_0.device)
      input_lengths = torch.min(input_len_0, input_len_1)
      return x, input_lengths
  
file_path: fairseq/fairseq/models/speech_to_text/modules/convolution.py
imports: from typing import List
  import torch
  import torch.nn
label_desc: Use image node_id 2 for calling the Conv2dSubsampler obj's underlying member method code with example usage: obj.forward(src_tokens, src_lengths) and returns: x,  input_lengths