class_docstr: Path Aggregation Network with CSP 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_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_csp_blocks=1,
      use_depthwise=True,
      act="hard_swish",
  ):
      super(CSPPAN, self).__init__()
      self.in_channels = in_channels
      self.out_channels = [out_channels] * len(in_channels)
      conv_func = DPModule if use_depthwise else ConvBNLayer
  
      self.conv_t = Channel_T(in_channels, out_channels, act=act)
  
      # 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(
              CSPLayer(
                  out_channels * 2,
                  out_channels,
                  kernel_size=kernel_size,
                  num_blocks=num_csp_blocks,
                  add_identity=False,
                  use_depthwise=use_depthwise,
                  act=act,
              )
          )
  
      # 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(
                  out_channels,
                  out_channels,
                  kernel_size=kernel_size,
                  stride=2,
                  act=act,
              )
          )
          self.bottom_up_blocks.append(
              CSPLayer(
                  out_channels * 2,
                  out_channels,
                  kernel_size=kernel_size,
                  num_blocks=num_csp_blocks,
                  add_identity=False,
                  use_depthwise=use_depthwise,
                  act=act,
              )
          )
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
label_desc: Use image node_id 1 to create a new CSPPAN object from inherited base classes: nn with example: obj = CSPPAN(in_channels, out_channels, kernel_size, num_csp_blocks, use_depthwise, act)