class_docstr: Path Aggregation Network with LCNet module.
  Args:
      in_channels (List[int]): Number of input channels per scale.
      out_channels (int): Number of output channels (used at each scale)
      kernel_size (int): The conv2d kernel size of this Module.
      num_features (int): Number of output features of CSPPAN module.
      num_csp_blocks (int): Number of bottlenecks in CSPLayer. Default: 1
      use_depthwise (bool): Whether to depthwise separable convolution in
          blocks. Default: True
class_docstr_tok: ["Path","Aggregation","Network","with","LCNet","module",".","Args",":","in_channels","(","List","[","int","]",")",":","Number","of","input","channels","per","scale",".","out_channels","(","int",")",":","Number","of","output","channels","(","used","at","each","scale",")","kernel_size","(","int",")",":","The","conv2d","kernel","size","of","this","Module",".","num_features","(","int",")",":","Number","of","output","features","of","CSPPAN","module",".","num_csp_blocks","(","int",")",":","Number","of","bottlenecks","in","CSPLayer",".","Default",":","1","use_depthwise","(","bool",")",":","Whether","to","depthwise","separable","convolution","in","blocks",".","Default",":","True"]
code: def __init__(
      self,
      in_channels,
      out_channels,
      kernel_size=5,
      num_features=3,
      use_depthwise=True,
      act="hard_swish",
      spatial_scales=[0.125, 0.0625, 0.03125],
  ):
      super(LCPAN, self).__init__()
      self.conv_t = Channel_T(in_channels, out_channels, act=act)
      in_channels = [out_channels] * len(spatial_scales)
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.spatial_scales = spatial_scales
      self.num_features = num_features
      conv_func = DPModule if use_depthwise else ConvBNLayer
  
      NET_CONFIG = {
          # k, in_c, out_c, stride, use_se
          "block1": [
              [
                  kernel_size,
                  out_channels * 2,
                  out_channels * 2,
                  1,
                  False,
              ],
              [kernel_size, out_channels * 2, out_channels, 1, False],
          ],
          "block2": [
              [
                  kernel_size,
                  out_channels * 2,
                  out_channels * 2,
                  1,
                  False,
              ],
              [kernel_size, out_channels * 2, out_channels, 1, False],
          ],
      }
  
      if self.num_features == 4:
          self.first_top_conv = conv_func(
              in_channels[0],
              in_channels[0],
              kernel_size,
              stride=2,
              act=act,
          )
          self.second_top_conv = conv_func(
              in_channels[0],
              in_channels[0],
              kernel_size,
              stride=2,
              act=act,
          )
          self.spatial_scales.append(self.spatial_scales[-1] / 2)
  
      # build top-down blocks
      self.upsample = nn.Upsample(scale_factor=2, mode="nearest")
      self.top_down_blocks = nn.LayerList()
      for idx in range(len(in_channels) - 1, 0, -1):
          self.top_down_blocks.append(
              nn.Sequential(
                  *[
                      DepthwiseSeparable(
                          num_channels=in_c,
                          num_filters=out_c,
                          dw_size=k,
                          stride=s,
                          use_se=se,
                      )
                      for i, (k, in_c, out_c, s, se) in enumerate(
                          NET_CONFIG["block1"]
                      )
                  ]
              )
          )
  
      # build bottom-up blocks
      self.downsamples = nn.LayerList()
      self.bottom_up_blocks = nn.LayerList()
      for idx in range(len(in_channels) - 1):
          self.downsamples.append(
              conv_func(
                  in_channels[idx],
                  in_channels[idx],
                  kernel_size=kernel_size,
                  stride=2,
                  act=act,
              )
          )
          self.bottom_up_blocks.append(
              nn.Sequential(
                  *[
                      DepthwiseSeparable(
                          num_channels=in_c,
                          num_filters=out_c,
                          dw_size=k,
                          stride=s,
                          use_se=se,
                      )
                      for i, (k, in_c, out_c, s, se) in enumerate(
                          NET_CONFIG["block2"]
                      )
                  ]
              )
          )
  
file_path: PaddleDetection/ppdet/modeling/necks/lc_pan.py
imports: 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 ..shape_spec import ShapeSpec
  from ..backbones.lcnet import DepthwiseSeparable
  from .csp_pan import ConvBNLayer, Channel_T, DPModule
label_desc: Use image node_id 1 to create a new LCPAN object from inherited base classes: nn with example: obj = LCPAN(in_channels, out_channels, kernel_size, num_features, use_depthwise, act, spatial_scales)