class_docstr: Spatial Pyramid Pooling (SPP) layer used in YOLOv3-SPP and YOLOX
code: def __init__(
      self,
      in_channels,
      out_channels,
      kernel_sizes=(5, 9, 13),
      bias=False,
      act="silu",
  ):
      super(SPPLayer, self).__init__()
      hidden_channels = in_channels // 2
      self.conv1 = BaseConv(
          in_channels,
          hidden_channels,
          ksize=1,
          stride=1,
          bias=bias,
          act=act,
      )
      self.maxpoolings = nn.LayerList(
          [
              nn.MaxPool2D(kernel_size=ks, stride=1, padding=ks // 2)
              for ks in kernel_sizes
          ]
      )
      conv2_channels = hidden_channels * (len(kernel_sizes) + 1)
      self.conv2 = BaseConv(
          conv2_channels,
          out_channels,
          ksize=1,
          stride=1,
          bias=bias,
          act=act,
      )
  
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 ppdet.modeling.initializer import conv_init_
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 1 to create a new SPPLayer object from inherited base classes: nn with example: obj = SPPLayer(in_channels, out_channels, kernel_sizes, bias, act)