class_docstr: Feature extraction in Mask head
  
  Args:
      in_channel (int): Input channels
      out_channel (int): Output channels
      num_convs (int): The number of conv layers, default 4
      norm_type (string | None): Norm type, bn, gn, sync_bn are available,
          default None
class_docstr_tok: ["Feature","extraction","in","Mask","head","Args",":","in_channel","(","int",")",":","Input","channels","out_channel","(","int",")",":","Output","channels","num_convs","(","int",")",":","The","number","of","conv","layers",",","default","4","norm_type","(","string","|","None",")",":","Norm","type",",","bn",",","gn",",","sync_bn","are","available",",","default","None"]
code: def __init__(
      self, in_channel=256, out_channel=256, num_convs=4, norm_type=None
  ):
      super(MaskFeat, self).__init__()
      self.num_convs = num_convs
      self.in_channel = in_channel
      self.out_channel = out_channel
      self.norm_type = norm_type
      fan_conv = out_channel * 3 * 3
      fan_deconv = out_channel * 2 * 2
  
      mask_conv = nn.Sequential()
      if norm_type == "gn":
          for i in range(self.num_convs):
              conv_name = "mask_inter_feat_{}".format(i + 1)
              mask_conv.add_sublayer(
                  conv_name,
                  ConvNormLayer(
                      ch_in=in_channel if i == 0 else out_channel,
                      ch_out=out_channel,
                      filter_size=3,
                      stride=1,
                      norm_type=self.norm_type,
                      initializer=KaimingNormal(fan_in=fan_conv),
                      skip_quant=True,
                  ),
              )
              mask_conv.add_sublayer(conv_name + "act", nn.ReLU())
      else:
          for i in range(self.num_convs):
              conv_name = "mask_inter_feat_{}".format(i + 1)
              conv = nn.Conv2D(
                  in_channels=in_channel if i == 0 else out_channel,
                  out_channels=out_channel,
                  kernel_size=3,
                  padding=1,
                  weight_attr=paddle.ParamAttr(
                      initializer=KaimingNormal(fan_in=fan_conv)
                  ),
              )
              conv.skip_quant = True
              mask_conv.add_sublayer(conv_name, conv)
              mask_conv.add_sublayer(conv_name + "act", nn.ReLU())
      mask_conv.add_sublayer(
          "conv5_mask",
          nn.Conv2DTranspose(
              in_channels=self.out_channel
              if num_convs > 0
              else self.in_channel,
              out_channels=self.out_channel,
              kernel_size=2,
              stride=2,
              weight_attr=paddle.ParamAttr(
                  initializer=KaimingNormal(fan_in=fan_deconv)
              ),
          ),
      )
      mask_conv.add_sublayer("conv5_mask" + "act", nn.ReLU())
      self.upsample = mask_conv
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import KaimingNormal
  from ppdet.core.workspace import register, create
  from ppdet.modeling.layers import ConvNormLayer
  from .roi_extractor import RoIAlign
  from ..cls_utils import _get_class_default_kwargs
label_desc: Use image node_id 1 to create a new MaskFeat object from inherited base classes: nn with example: obj = MaskFeat(in_channel, out_channel, num_convs, norm_type)