code: def __init__(
      self,
      in_channels,
      mid_channels,
      out_channels,
      kernel_size,
      stride,
      use_se,
      act=None,
  ):
      super(ResidualUnit, self).__init__()
      self.if_shortcut = stride == 1 and in_channels == out_channels
      self.if_se = use_se
  
      self.expand_conv = ConvBNLayer(
          in_channels=in_channels,
          out_channels=mid_channels,
          kernel_size=1,
          stride=1,
          padding=0,
          if_act=True,
          act=act,
      )
      self.bottleneck_conv = ConvBNLayer(
          in_channels=mid_channels,
          out_channels=mid_channels,
          kernel_size=kernel_size,
          stride=stride,
          padding=int((kernel_size - 1) // 2),
          groups=mid_channels,
          if_act=True,
          act=act,
      )
      if self.if_se:
          self.mid_se = SEModule(mid_channels)
      self.linear_conv = ConvBNLayer(
          in_channels=mid_channels,
          out_channels=out_channels,
          kernel_size=1,
          stride=1,
          padding=0,
          if_act=False,
          act=None,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import nn
  import paddle.nn.functional
  from paddle import ParamAttr
label_desc: Use image node_id 1 to create a new ResidualUnit object from inherited base classes: nn with example: obj = ResidualUnit(in_channels, mid_channels, out_channels, kernel_size, stride, use_se, act)