code: def __init__(
      self, scale=1.0, act="relu", in_channels=3, pretrained=None
  ):
      super(ShuffleNet, self).__init__()
      self.scale = scale
      self.pretrained = pretrained
      stage_repeats = [4, 8, 4]
  
      if scale == 0.25:
          stage_out_channels = [-1, 24, 24, 48, 96, 512]
      elif scale == 0.33:
          stage_out_channels = [-1, 24, 32, 64, 128, 512]
      elif scale == 0.5:
          stage_out_channels = [-1, 24, 48, 96, 192, 1024]
      elif scale == 1.0:
          stage_out_channels = [-1, 24, 116, 232, 464, 1024]
      elif scale == 1.5:
          stage_out_channels = [-1, 24, 176, 352, 704, 1024]
      elif scale == 2.0:
          stage_out_channels = [-1, 24, 224, 488, 976, 2048]
      else:
          raise NotImplementedError(
              "This scale size:[" + str(scale) + "] is not implemented!"
          )
  
      self.out_index = [3, 11, 15]
      self.feat_channels = stage_out_channels[1:5]
  
      # 1. conv1
      self._conv1 = ConvBNLayer(
          in_channels=in_channels,
          out_channels=stage_out_channels[1],
          kernel_size=3,
          stride=2,
          padding=1,
          act=act,
          name="stage1_conv",
      )
      self._max_pool = MaxPool2D(kernel_size=3, stride=2, padding=1)
  
      # 2. bottleneck sequences
      self._block_list = []
      for stage_id, num_repeat in enumerate(stage_repeats):
          for i in range(num_repeat):
              if i == 0:
                  block = self.add_sublayer(
                      name=str(stage_id + 2) + "_" + str(i + 1),
                      sublayer=InvertedResidualDS(
                          in_channels=stage_out_channels[stage_id + 1],
                          out_channels=stage_out_channels[stage_id + 2],
                          stride=2,
                          act=act,
                          name=str(stage_id + 2) + "_" + str(i + 1),
                      ),
                  )
              else:
                  block = self.add_sublayer(
                      name=str(stage_id + 2) + "_" + str(i + 1),
                      sublayer=InvertedResidual(
                          in_channels=stage_out_channels[stage_id + 2],
                          out_channels=stage_out_channels[stage_id + 2],
                          stride=1,
                          act=act,
                          name=str(stage_id + 2) + "_" + str(i + 1),
                      ),
                  )
              self._block_list.append(block)
  
      self.init_weight()
  
imports: import paddle
  from paddle import ParamAttr, reshape, transpose, concat, split
  from paddle.nn import Layer, Conv2D, MaxPool2D, AdaptiveAvgPool2D, BatchNorm, Linear
  from paddle.nn.initializer import KaimingNormal
  from paddle.nn.functional import swish
  from paddleseg.cvlibs import manager
  from paddleseg.utils import utils, logger
label_desc: Use image node_id 1 to create a new ShuffleNet object from inherited base classes: Layer with example: obj = ShuffleNet(scale, act, in_channels, pretrained)