class_docstr: The UPerNetHead implementation.
  
  Args:
      inplane (int): Input channels of PPM module.
      num_class (int): The unique number of target classes.
      channels_fpn (list): The feature channels from backbone.
      fpn_channels (int, optional): The input channels of FPN module. Default: 512.
      enable_auxiliary_loss (bool, optional): A bool value indicates whether adding auxiliary loss. Default: False.
code: def __init__(
      self,
      inplane,
      num_class,
      channels_fpn,
      channels,
      dropout_ratio=0.1,
      fpn_channels=512,
      enable_auxiliary_loss=False,
  ):
      super(UPerNetHead, self).__init__()
      self.psp_modules = PPModuleCAE(
          in_channels=inplane,
          out_channels=fpn_channels,
          bin_sizes=(1, 2, 3, 6),
          dim_reduction=False,
          align_corners=False,
      )
  
      self.enable_auxiliary_loss = enable_auxiliary_loss
      self.lateral_convs = []
      self.fpn_convs = []
  
      for fpn_inplane in channels_fpn[:-1]:
          self.lateral_convs.append(
              nn.Sequential(
                  nn.Conv2D(
                      fpn_inplane, fpn_channels, 1, bias_attr=False
                  ),
                  layers.SyncBatchNorm(fpn_channels),
                  nn.ReLU(),
              )
          )
          self.fpn_convs.append(
              nn.Sequential(
                  layers.ConvBNReLU(
                      fpn_channels, fpn_channels, 3, bias_attr=False
                  )
              )
          )
  
      self.lateral_convs = nn.LayerList(self.lateral_convs)
      self.fpn_convs = nn.LayerList(self.fpn_convs)
  
      if self.enable_auxiliary_loss:
          if dropout_ratio is not None:
              self.dsn = nn.Sequential(
                  layers.ConvBNReLU(
                      channels_fpn[2],
                      256,
                      3,
                      padding=1,
                      bias_attr=False,
                  ),
                  nn.Dropout2D(dropout_ratio),
                  nn.Conv2D(256, num_class, kernel_size=1),
              )
          else:
              self.dsn = nn.Sequential(
                  layers.ConvBNReLU(
                      channels_fpn[2],
                      256,
                      3,
                      padding=1,
                      bias_attr=False,
                  ),
                  nn.Conv2D(256, num_class, kernel_size=1),
              )
  
      if dropout_ratio is not None:
          self.dropout = nn.Dropout2D(dropout_ratio)
      else:
          self.dropout = None
  
      self.fpn_bottleneck = layers.ConvBNReLU(
          len(channels_fpn) * channels,
          channels,
          3,
          padding=1,
          bias_attr=False,
      )
      self.conv_seg = nn.Conv2D(channels, num_class, kernel_size=1)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.utils import utils
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.models.backbones.transformer_utils import Identity
label_desc: Use image node_id 1 to create a new UPerNetHead object from inherited base classes: nn with example: obj = UPerNetHead(inplane, num_class, channels_fpn, channels, dropout_ratio, fpn_channels, enable_auxiliary_loss)