class_docstr: Cross Stage Partial Layer.
  Args:
      in_channels (int): The input channels of the CSP layer.
      out_channels (int): The output channels of the CSP layer.
      expand_ratio (float): Ratio to adjust the number of channels of the
          hidden layer. Default: 0.5
      num_blocks (int): Number of blocks. Default: 1
      add_identity (bool): Whether to add identity in blocks.
          Default: True
      use_depthwise (bool): Whether to depthwise separable convolution in
          blocks. Default: False
code: def __init__(
      self,
      in_channels,
      out_channels,
      kernel_size=3,
      expand_ratio=0.5,
      num_blocks=1,
      add_identity=True,
      use_depthwise=False,
      act="leaky_relu",
  ):
      super().__init__()
      mid_channels = int(out_channels * expand_ratio)
      self.main_conv = ConvBNLayer(
          in_channels, mid_channels, 1, act=act
      )
      self.short_conv = ConvBNLayer(
          in_channels, mid_channels, 1, act=act
      )
      self.final_conv = ConvBNLayer(
          2 * mid_channels, out_channels, 1, act=act
      )
  
      self.blocks = nn.Sequential(
          *[
              DarknetBottleneck(
                  mid_channels,
                  mid_channels,
                  kernel_size,
                  1.0,
                  add_identity,
                  use_depthwise,
                  act=act,
              )
              for _ in range(num_blocks)
          ]
      )
  
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 CSPLayer object from inherited base classes: nn with example: obj = CSPLayer(in_channels, out_channels, kernel_size, expand_ratio, num_blocks, add_identity, use_depthwise, act)