class_docstr: This code is based on
  https://github.com/facebookresearch/detr/blob/main/models/segmentation.py
  
  Simple convolutional head, using group norm.
  Upsampling is done using a FPN approach
class_docstr_tok: ["This","code","is","based","on","https",":","\/\/github.com\/facebookresearch\/detr\/blob\/main\/models\/segmentation.py","Simple","convolutional","head",",","using","group","norm",".","Upsampling","is","done","using","a","FPN","approach"]
code: def __init__(self, input_dim, fpn_dims, context_dim, num_groups=8):
      super().__init__()
  
      inter_dims = [
          input_dim,
      ] + [context_dim // (2**i) for i in range(1, 5)]
      weight_attr = paddle.ParamAttr(
          initializer=paddle.nn.initializer.KaimingUniform()
      )
      bias_attr = paddle.framework.ParamAttr(
          initializer=paddle.nn.initializer.Constant()
      )
  
      self.conv0 = self._make_layers(
          input_dim, input_dim, 3, num_groups, weight_attr, bias_attr
      )
      self.conv_inter = nn.LayerList()
      for in_dims, out_dims in zip(inter_dims[:-1], inter_dims[1:]):
          self.conv_inter.append(
              self._make_layers(
                  in_dims,
                  out_dims,
                  3,
                  num_groups,
                  weight_attr,
                  bias_attr,
              )
          )
  
      self.conv_out = nn.Conv2D(
          inter_dims[-1],
          1,
          3,
          padding=1,
          weight_attr=weight_attr,
          bias_attr=bias_attr,
      )
  
      self.adapter = nn.LayerList()
      for i in range(len(fpn_dims)):
          self.adapter.append(
              nn.Conv2D(
                  fpn_dims[i],
                  inter_dims[i + 1],
                  1,
                  weight_attr=weight_attr,
                  bias_attr=bias_attr,
              )
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  import pycocotools.mask
  from ..initializer import linear_init_, constant_
  from ..transformers.utils import inverse_sigmoid
label_desc: Use image node_id 1 to create a new MaskHeadFPNConv object from inherited base classes: nn with example: obj = MaskHeadFPNConv(input_dim, fpn_dims, context_dim, num_groups)