class_docstr: The PP_LiteSeg implementation based on PaddlePaddle.
  
  The original article refers to "Juncai Peng, Yi Liu, Shiyu Tang, Yuying Hao, Lutao Chu,
  Guowei Chen, Zewu Wu, Zeyu Chen, Zhiliang Yu, Yuning Du, Qingqing Dang,Baohua Lai,
  Qiwen Liu, Xiaoguang Hu, Dianhai Yu, Yanjun Ma. PP-LiteSeg: A Superior Real-Time Semantic
  Segmentation Model. https://arxiv.org/abs/2204.02681".
  
  Args:
      num_classes (int): The number of target classes.
      backbone(nn.Layer): Backbone network, such as stdc1net and resnet18. The backbone must
          has feat_channels, of which the length is 5.
      backbone_indices (List(int), optional): The values indicate the indices of output of backbone.
          Default: [2, 3, 4].
      arm_type (str, optional): The type of attention refinement module. Default: ARM_Add_SpAttenAdd3.
      cm_bin_sizes (List(int), optional): The bin size of context module. Default: [1,2,4].
      cm_out_ch (int, optional): The output channel of the last context module. Default: 128.
      arm_out_chs (List(int), optional): The out channels of each arm module. Default: [64, 96, 128].
      seg_head_inter_chs (List(int), optional): The intermediate channels of segmentation head.
          Default: [64, 64, 64].
      resize_mode (str, optional): The resize mode for the upsampling operation in decoder.
          Default: bilinear.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
code: def __init__(
      self,
      num_classes,
      backbone,
      backbone_indices=[2, 3, 4],
      arm_type="UAFM_SpAtten",
      cm_bin_sizes=[1, 2, 4],
      cm_out_ch=128,
      arm_out_chs=[64, 96, 128],
      seg_head_inter_chs=[64, 64, 64],
      resize_mode="bilinear",
      pretrained=None,
  ):
      super().__init__()
  
      # backbone
      assert hasattr(
          backbone, "feat_channels"
      ), "The backbone should has feat_channels."
      assert len(backbone.feat_channels) >= len(backbone_indices), (
          f"The length of input backbone_indices ({len(backbone_indices)}) should not be"
          f"greater than the length of feat_channels ({len(backbone.feat_channels)})."
      )
      assert len(backbone.feat_channels) > max(backbone_indices), (
          f"The max value ({max(backbone_indices)}) of backbone_indices should be "
          f"less than the length of feat_channels ({len(backbone.feat_channels)})."
      )
      self.backbone = backbone
  
      assert len(backbone_indices) > 1, (
          "The lenght of backbone_indices " "should be greater than 1"
      )
      self.backbone_indices = backbone_indices  # [..., x16_id, x32_id]
      backbone_out_chs = [
          backbone.feat_channels[i] for i in backbone_indices
      ]
  
      # head
      if len(arm_out_chs) == 1:
          arm_out_chs = arm_out_chs * len(backbone_indices)
      assert len(arm_out_chs) == len(backbone_indices), (
          "The length of "
          "arm_out_chs and backbone_indices should be equal"
      )
  
      self.ppseg_head = PPLiteSegHead(
          backbone_out_chs,
          arm_out_chs,
          cm_bin_sizes,
          cm_out_ch,
          arm_type,
          resize_mode,
      )
  
      if len(seg_head_inter_chs) == 1:
          seg_head_inter_chs = seg_head_inter_chs * len(
              backbone_indices
          )
      assert len(seg_head_inter_chs) == len(backbone_indices), (
          "The length of "
          "seg_head_inter_chs and backbone_indices should be equal"
      )
      self.seg_heads = nn.LayerList()  # [..., head_16, head32]
      for in_ch, mid_ch in zip(arm_out_chs, seg_head_inter_chs):
          self.seg_heads.append(SegHead(in_ch, mid_ch, num_classes))
  
      # pretrained
      self.pretrained = pretrained
      self.init_weight()
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg import utils
  from paddleseg.models import layers
  from paddleseg.cvlibs import manager
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new PPLiteSeg object from inherited base classes: nn with example: obj = PPLiteSeg(num_classes, backbone, backbone_indices, arm_type, cm_bin_sizes, cm_out_ch, arm_out_chs, seg_head_inter_chs, resize_mode, pretrained)