class_docstr: The mask head of segmenter.
  Args:
      num_classes (int): The unique number of target classes.
      in_dim (int): The embed dim of input.
      embed_dim (int): Embedding dim of mask transformer.
      depth (int): The num of layers in Transformer.
      num_heads (int): The num of heads in MSA.
      mlp_ratio (int, optional): Ratio of MLP dim. Default: 4.
      drop_rate (float, optional): Drop rate of MLP in MSA. Default: 0.0.
      drop_path_rate (float, optional): Drop path rate in MSA. Default: 0.0.
      attn_drop_rate (float, optional): Attenation drop rate in MSA. Default: 0.0.
      qkv_bias (bool, optional): Whether add bias in qkv linear. Default: False.
code: def __init__(
      self,
      num_classes,
      in_dim,
      embed_dim,
      depth,
      num_heads,
      mlp_ratio=4,
      drop_rate=0.0,
      drop_path_rate=0.0,
      attn_drop_rate=0.0,
      qkv_bias=False,
  ):
      super().__init__()
      self.num_classes = num_classes
  
      self.proj_input = nn.Linear(in_dim, embed_dim)
  
      self.cls_token = self.create_parameter(
          shape=(1, num_classes, embed_dim),
          default_initializer=paddle.nn.initializer.TruncatedNormal(
              std=0.02
          ),
      )
  
      dpr = [x for x in np.linspace(0, drop_path_rate, depth)]
      self.blocks = nn.LayerList(
          [
              vision_transformer.Block(
                  dim=embed_dim,
                  num_heads=num_heads,
                  mlp_ratio=mlp_ratio,
                  drop=drop_rate,
                  drop_path=dpr[i],
                  attn_drop=attn_drop_rate,
                  qkv_bias=qkv_bias,
              )
              for i in range(depth)
          ]
      )
  
      initializer = paddle.nn.initializer.TruncatedNormal(std=0.02)
      self.proj_patch = nn.Linear(
          embed_dim,
          embed_dim,
          weight_attr=paddle.ParamAttr(initializer=initializer),
          bias_attr=False,
      )
      self.proj_class = nn.Linear(
          embed_dim,
          embed_dim,
          weight_attr=paddle.ParamAttr(initializer=initializer),
          bias_attr=False,
      )
  
      self.decoder_norm = nn.LayerNorm(embed_dim)
      self.mask_norm = nn.LayerNorm(num_classes)
  
      self.apply(transformer_utils.init_weights)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  from paddleseg.utils import utils
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models.backbones import vision_transformer, transformer_utils
label_desc: Use image node_id 1 to create a new SegmenterMaskHead object from inherited base classes: nn with example: obj = SegmenterMaskHead(num_classes, in_dim, embed_dim, depth, num_heads, mlp_ratio, drop_rate, drop_path_rate, attn_drop_rate, qkv_bias)