class_docstr: The convolution module for the Conformer model.
  Args:
      d_model (int): hidden dimension
      kernel_size (int): kernel size for depthwise convolution
      pointwise_activation (str): name of the activation function to be used for the pointwise conv.
          Note that Conformer uses a special key `glu_` which is treated as the original default from
          the paper.
class_docstr_tok: ["The","convolution","module","for","the","Conformer","model",".","Args",":","d_model","(","int",")",":","hidden","dimension","kernel_size","(","int",")",":","kernel","size","for","depthwise","convolution","pointwise_activation","(","str",")",":","name","of","the","activation","function","to","be","used","for","the","pointwise","conv",".","Note","that","Conformer","uses","a","special","key","`","glu_","`","which","is","treated","as","the","original","default","from","the","paper","."]
code: def forward(self, x, pad_mask=None, cache=None):
      x = x.transpose(1, 2)
      x = self.pointwise_conv1(x)
  
      # Compute the activation function or use GLU for original Conformer
      if self.pointwise_activation == "glu_":
          x = nn.functional.glu(x, dim=1)
      else:
          x = self.pointwise_activation(x)
  
      if pad_mask is not None:
          x = x.float().masked_fill(pad_mask.unsqueeze(1), 0.0)
  
      x = self.depthwise_conv(x, cache=cache)
      if cache is not None:
          x, cache = x
  
      if self.norm_type == "layer_norm":
          x = x.transpose(1, 2)
          x = self.batch_norm(x)
          x = x.transpose(1, 2)
      else:
          x = self.batch_norm(x)
  
      x = self.activation(x)
      x = self.pointwise_conv2(x)
      x = x.transpose(1, 2)
      if cache is None:
          return x
      else:
          return x, cache
  
imports: import torch
  from torch import nn
  from torch.nn import LayerNorm
  from nemo.collections.asr.parts.submodules.batchnorm import FusedBatchNorm1d
  from nemo.collections.asr.parts.submodules.causal_convs import CausalConv1D
  from nemo.collections.asr.parts.submodules.multi_head_attention import MultiHeadAttention, RelPositionMultiHeadAttention, RelPositionMultiHeadAttentionLongformer
  from nemo.collections.asr.parts.utils.activations import Swish
  from nemo.collections.common.parts import adapter_modules
  from nemo.collections.common.parts.utils import activation_registry
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.classes.mixins.adapter_mixins import AdapterModuleMixin
label_desc: Use image node_id 2 for calling the ConformerConvolution obj's underlying member method code with example usage: obj.forward(x, pad_mask, cache) and returns: x, x,  cache