code: def __init__(
      self,
      in_c,
      mid_c,
      out_c,
      filter_size,
      stride,
      use_se,
      lr_mult,
      conv_decay=0.0,
      norm_type="bn",
      norm_decay=0.0,
      freeze_norm=False,
      act=None,
      return_list=False,
      name="",
  ):
      super(ResidualUnit, self).__init__()
      self.if_shortcut = stride == 1 and in_c == out_c
      self.use_se = use_se
      self.return_list = return_list
  
      self.expand_conv = ConvBNLayer(
          in_c=in_c,
          out_c=mid_c,
          filter_size=1,
          stride=1,
          padding=0,
          act=act,
          lr_mult=lr_mult,
          conv_decay=conv_decay,
          norm_type=norm_type,
          norm_decay=norm_decay,
          freeze_norm=freeze_norm,
          name=name + "_expand",
      )
      self.bottleneck_conv = ConvBNLayer(
          in_c=mid_c,
          out_c=mid_c,
          filter_size=filter_size,
          stride=stride,
          padding=int((filter_size - 1) // 2),
          num_groups=mid_c,
          act=act,
          lr_mult=lr_mult,
          conv_decay=conv_decay,
          norm_type=norm_type,
          norm_decay=norm_decay,
          freeze_norm=freeze_norm,
          name=name + "_depthwise",
      )
      if self.use_se:
          self.mid_se = SEModule(
              mid_c, lr_mult, conv_decay, name=name + "_se"
          )
      self.linear_conv = ConvBNLayer(
          in_c=mid_c,
          out_c=out_c,
          filter_size=1,
          stride=1,
          padding=0,
          act=None,
          lr_mult=lr_mult,
          conv_decay=conv_decay,
          norm_type=norm_type,
          norm_decay=norm_decay,
          freeze_norm=freeze_norm,
          name=name + "_linear",
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from ppdet.core.workspace import register, serializable
  from numbers import Integral
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 1 to create a new ResidualUnit object from inherited base classes: nn with example: obj = ResidualUnit(in_c, mid_c, out_c, filter_size, stride, use_se, lr_mult, conv_decay, norm_type, norm_decay, freeze_norm, act, return_list, name)