class_docstr: MBConv block as described in: https://arxiv.org/pdf/2204.01697.pdf.
      Without downsampling:
      x ← x + Proj(SE(DWConv(Conv(Norm(x)))))
      With downsampling:
      x ← Proj(Pool2D(x)) + Proj(SE(DWConv ↓(Conv(Norm(x))))).
      Conv is a 1 X 1 convolution followed by a Batch Normalization layer and a GELU activation.
      SE is the Squeeze-Excitation layer.
      Proj is the shrink 1 X 1 convolution.
      Note: This implementation differs slightly from the original MobileNet implementation!
  Args:
      in_channels (`int`):
          Number of input channels.
      out_channels (`int`):
          Number of output channels.
      downscale (`bool`):
          If true downscale by a factor of two is performed. Default: False
      act_layer (`nn.Module`):
          Type of activation layer to be utilized. Default: nn.GELU
      norm_layer (`nn.Module`):
          Type of normalization layer to be utilized. Default: nn.BatchNorm2d
      drop_path (`float`):
          Dropout rate to be applied during training. Default 0.
class_docstr_tok: ["MBConv","block","as","described","in",":","https",":","\/\/arxiv.org\/pdf\/2204.01697.pdf",".","Without","downsampling",":","x","\u2190","x","+","Proj","(","SE","(","DWConv","(","Conv","(","Norm","(","x",")",")",")",")",")","With","downsampling",":","x","\u2190","Proj","(","Pool2D","(","x",")",")","+","Proj","(","SE","(","DWConv","\u2193","(","Conv","(","Norm","(","x",")",")",")",")",")",".","Conv","is","a","1","X","1","convolution","followed","by","a","Batch","Normalization","layer","and","a","GELU","activation",".","SE","is","the","Squeeze-Excitation","layer",".","Proj","is","the","shrink","1","X","1","convolution",".","Note",":","This","implementation","differs","slightly","from","the","original","MobileNet","implementation","!","Args",":","in_channels","(","`","int","`",")",":","Number","of","input","channels",".","out_channels","(","`","int","`",")",":","Number","of","output","channels",".","downscale","(","`","bool","`",")",":","If","true","downscale","by","a","factor","of","two","is","performed",".","Default",":","False","act_layer","(","`","nn.Module","`",")",":","Type","of","activation","layer","to","be","utilized",".","Default",":","nn.GELU","norm_layer","(","`","nn.Module","`",")",":","Type","of","normalization","layer","to","be","utilized",".","Default",":","nn.BatchNorm2d","drop_path","(","`","float","`",")",":","Dropout","rate","to","be","applied","during","training",".","Default","0","."]
docstr: Forward pass.
  Args:
      data (torch.Tensor): Input tensor of the shape [B, C_in, H, W].
  Returns:
      output (torch.Tensor): Output tensor of the shape [B, C_out, H (// 2), W (// 2)] (downscaling is optional).
docstr_tok: ["Forward","pass",".","Args",":","data","(","torch.Tensor",")",":","Input","tensor","of","the","shape","[","B",",","C_in",",","H",",","W","]",".","Returns",":","output","(","torch.Tensor",")",":","Output","tensor","of","the","shape","[","B",",","C_out",",","H","(","\/\/","2",")",",","W","(","\/\/","2",")","]","(","downscaling","is","optional",")","."]
code: def forward(self, data: torch.Tensor) -> torch.Tensor:
      """Forward pass.
      Args:
          data (torch.Tensor): Input tensor of the shape [B, C_in, H, W].
      Returns:
          output (torch.Tensor): Output tensor of the shape [B, C_out, H (// 2), W (// 2)] (downscaling is optional).
      """
      output = self.main_path(data)
      if self.drop_path_rate > 0.0:
          output = self.drop_path(output)
      output = output + self.skip_path(data)
      return output
  
file_path: towhee/towhee/models/layers/mbconv.py
imports: from typing import Type
  import torch
  from timm.layers import SqueezeExcite
  from timm.models._efficientnet_blocks import DepthwiseSeparableConv
  from torch import nn
  from towhee.models.layers.droppath import DropPath
  from towhee.models.utils.gelu_ignore_parameters import gelu_ignore_parameters
label_desc: Use image node_id 2 for calling the MBConv obj's underlying member method code with example usage: obj.forward(data) and returns: output