class_docstr: Mobile inverted bottleneck block with SE.
code: def __init__(self, w_in, exp_r, k, stride, se_r, w_out):
      # Expansion, kxk dwise, BN, AF, SE, 1x1, BN, skip_connection
      super(MBConv, self).__init__()
      self.exp = None
      w_exp = int(w_in * exp_r)
      if w_exp != w_in:
          self.exp = conv2d(w_in, w_exp, 1)
          self.exp_bn = norm2d(w_exp)
          self.exp_af = activation()
      self.dwise = conv2d(w_exp, w_exp, k, stride=stride, groups=w_exp)
      self.dwise_bn = norm2d(w_exp)
      self.dwise_af = activation()
      self.se = SE(w_exp, int(w_in * se_r))
      self.lin_proj = conv2d(w_exp, w_out, 1)
      self.lin_proj_bn = norm2d(w_out)
      self.has_skip = stride == 1 and w_in == w_out
  
imports: from pycls.core.config import cfg
  from pycls.models.blocks import activation, conv2d, conv2d_cx, drop_connect, gap2d, gap2d_cx, init_weights, linear, linear_cx, norm2d, norm2d_cx, SE
  from torch.nn import Dropout, Module
label_desc: Use image node_id 1 to create a new MBConv object from inherited base classes: Module with example: obj = MBConv(w_in, exp_r, k, stride, se_r, w_out)