code: def PPHGNet_small(
      pretrained=False, use_ssld=False, det=False, **kwargs
  ):
      """
      PPHGNet_small
      Args:
          pretrained: bool=False or str. If `True` load pretrained parameters, `False` otherwise.
                      If str, means the path of the pretrained model.
          use_ssld: bool=False. Whether using distillation pretrained model when pretrained=True.
      Returns:
          model: nn.Layer. Specific `PPHGNet_small` model depends on args.
      """
      stage_config_det = {
          # in_channels, mid_channels, out_channels, blocks, downsample
          "stage1": [128, 128, 256, 1, False, 2],
          "stage2": [256, 160, 512, 1, True, 2],
          "stage3": [512, 192, 768, 2, True, 2],
          "stage4": [768, 224, 1024, 1, True, 2],
      }
  
      stage_config_rec = {
          # in_channels, mid_channels, out_channels, blocks, downsample
          "stage1": [128, 128, 256, 1, True, [2, 1]],
          "stage2": [256, 160, 512, 1, True, [1, 2]],
          "stage3": [512, 192, 768, 2, True, [2, 1]],
          "stage4": [768, 224, 1024, 1, True, [2, 1]],
      }
  
      model = PPHGNet(
          stem_channels=[64, 64, 128],
          stage_config=stage_config_det if det else stage_config_rec,
          layer_num=6,
          det=det,
          **kwargs,
      )
      return model
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import KaimingNormal, Constant
  from paddle.nn import Conv2D, BatchNorm2D, ReLU, AdaptiveAvgPool2D, MaxPool2D
  from paddle.regularizer import L2Decay
  from paddle import ParamAttr
label_desc: Use image node_id 2 for calling a global function with example usage: PPHGNet_small(pretrained, use_ssld, det) and returns: model