class_docstr: Squeezeformer Time Reduction procedure. Downsamples the audio by `stride` in the time dimension.
  
  Args:
      d_model (int): input dimension of MultiheadAttentionMechanism and PositionwiseFeedForward
      out_dim (int): Output dimension of the module.
      kernel_size (int): Conv kernel size for depthwise convolution in convolution module
      stride (int): Downsampling factor in time dimension.
class_docstr_tok: ["Squeezeformer","Time","Reduction","procedure",".","Downsamples","the","audio","by","`","stride","`","in","the","time","dimension",".","Args",":","d_model","(","int",")",":","input","dimension","of","MultiheadAttentionMechanism","and","PositionwiseFeedForward","out_dim","(","int",")",":","Output","dimension","of","the","module",".","kernel_size","(","int",")",":","Conv","kernel","size","for","depthwise","convolution","in","convolution","module","stride","(","int",")",":","Downsampling","factor","in","time","dimension","."]
code: def forward(self, x, att_mask=None, pad_mask=None):
      x = x.transpose(1, 2)  # [B, C, T]
      if pad_mask is not None:
          x = x.float().masked_fill(pad_mask.unsqueeze(1), 0.0)
  
      x = self.dw_conv(x)
      x = self.pw_conv(x)
  
      x = x.transpose(1, 2)  # [B, T, C]
  
      B, T, D = x.size()
      if att_mask is not None and pad_mask is not None:
          att_mask = att_mask[:, :: self.stride, :: self.stride]
          pad_mask = pad_mask[:, :: self.stride]
          L = pad_mask.size(-1)
          x = torch.nn.functional.pad(x, (0, 0, 0, L - T))
  
      return x, att_mask, pad_mask
  
imports: import math
  import torch
  import torch.nn
  from torch.nn import LayerNorm
  from nemo.collections.asr.parts.submodules.causal_convs import CausalConv1D, CausalConv2D
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the TimeReductionModule obj's underlying member method code with example usage: obj.forward(x, att_mask, pad_mask) and returns: x,  att_mask,  pad_mask