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 __init__(
      self,
      d_model: int,
      out_dim: int,
      kernel_size: int = 5,
      stride: int = 2,
  ):
      super().__init__()
  
      self.d_model = d_model
      self.out_dim = out_dim
      self.kernel_size = kernel_size
      self.stride = stride
      self.padding = max(0, self.kernel_size - self.stride)
  
      self.dw_conv = nn.Conv1d(
          in_channels=d_model,
          out_channels=d_model,
          kernel_size=kernel_size,
          stride=stride,
          padding=self.padding,
          groups=d_model,
      )
  
      self.pw_conv = nn.Conv1d(
          in_channels=d_model,
          out_channels=out_dim,
          kernel_size=1,
          stride=1,
          padding=0,
          groups=1,
      )
  
      self.reset_parameters()
  
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 1 to create a new TimeReductionModule object from inherited base classes: nn with example: obj = TimeReductionModule(d_model, out_dim, kernel_size, stride)