class_docstr: Convolutional Gating MLP (cgMLP).
code: def forward(self, x, mask):
      if isinstance(x, tuple):
          xs_pad, pos_emb = x
      else:
          xs_pad, pos_emb = x, None
  
      xs_pad = self.channel_proj1(xs_pad)  # size -> linear_units
      xs_pad = self.csgu(xs_pad)  # linear_units -> linear_units/2
      xs_pad = self.channel_proj2(xs_pad)  # linear_units/2 -> size
  
      if pos_emb is not None:
          out = (xs_pad, pos_emb)
      else:
          out = xs_pad
      return out
  
file_path: espnet/espnet2/asr/layers/cgmlp.py
imports: import torch
  from espnet.nets.pytorch_backend.nets_utils import get_activation
  from espnet.nets.pytorch_backend.transformer.layer_norm import LayerNorm
label_desc: Use image node_id 2 for calling the ConvolutionalGatingMLP obj's underlying member method code with example usage: obj.forward(x, mask) and returns: out