class_docstr: PP-LCNet, see https://arxiv.org/abs/2109.15099.
  This code is different from PPLCNet in ppdet/modeling/backbones/lcnet.py
  or in PaddleClas, because the output is the flatten feature of last_conv.
  
  Args:
      scale (float): Scale ratio of channels.
      class_expand (int): Number of channels of conv feature.
code: def __init__(self, scale=1.0, class_expand=1280):
      super(PPLCNet, self).__init__()
      self.scale = scale
      self.class_expand = class_expand
  
      self.conv1 = ConvBNLayer(
          num_channels=3,
          filter_size=3,
          num_filters=make_divisible(16 * scale),
          stride=2,
      )
  
      self.blocks2 = nn.Sequential(
          *[
              DepthwiseSeparable(
                  num_channels=make_divisible(in_c * scale),
                  num_filters=make_divisible(out_c * scale),
                  dw_size=k,
                  stride=s,
                  use_se=se,
              )
              for i, (k, in_c, out_c, s, se) in enumerate(
                  NET_CONFIG["blocks2"]
              )
          ]
      )
  
      self.blocks3 = nn.Sequential(
          *[
              DepthwiseSeparable(
                  num_channels=make_divisible(in_c * scale),
                  num_filters=make_divisible(out_c * scale),
                  dw_size=k,
                  stride=s,
                  use_se=se,
              )
              for i, (k, in_c, out_c, s, se) in enumerate(
                  NET_CONFIG["blocks3"]
              )
          ]
      )
  
      self.blocks4 = nn.Sequential(
          *[
              DepthwiseSeparable(
                  num_channels=make_divisible(in_c * scale),
                  num_filters=make_divisible(out_c * scale),
                  dw_size=k,
                  stride=s,
                  use_se=se,
              )
              for i, (k, in_c, out_c, s, se) in enumerate(
                  NET_CONFIG["blocks4"]
              )
          ]
      )
  
      self.blocks5 = nn.Sequential(
          *[
              DepthwiseSeparable(
                  num_channels=make_divisible(in_c * scale),
                  num_filters=make_divisible(out_c * scale),
                  dw_size=k,
                  stride=s,
                  use_se=se,
              )
              for i, (k, in_c, out_c, s, se) in enumerate(
                  NET_CONFIG["blocks5"]
              )
          ]
      )
  
      self.blocks6 = nn.Sequential(
          *[
              DepthwiseSeparable(
                  num_channels=make_divisible(in_c * scale),
                  num_filters=make_divisible(out_c * scale),
                  dw_size=k,
                  stride=s,
                  use_se=se,
              )
              for i, (k, in_c, out_c, s, se) in enumerate(
                  NET_CONFIG["blocks6"]
              )
          ]
      )
  
      self.avg_pool = AdaptiveAvgPool2D(1)
      self.last_conv = Conv2D(
          in_channels=make_divisible(
              NET_CONFIG["blocks6"][-1][2] * scale
          ),
          out_channels=self.class_expand,
          kernel_size=1,
          stride=1,
          padding=0,
          bias_attr=False,
      )
      self.hardswish = nn.Hardswish()
      self.flatten = nn.Flatten(start_axis=1, stop_axis=-1)
  
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.nn.initializer import Normal, Constant
  from paddle import ParamAttr
  from paddle.nn import AdaptiveAvgPool2D, BatchNorm2D, Conv2D, Linear
  from paddle.regularizer import L2Decay
  from paddle.nn.initializer import KaimingNormal, XavierNormal
  from ppdet.core.workspace import register
label_desc: Use image node_id 1 to create a new PPLCNet object from inherited base classes: nn with example: obj = PPLCNet(scale, class_expand)