class_docstr: Head block for SOLOv2 network
  
  Args:
      num_classes (int): Number of output classes.
      in_channels (int): Number of input channels.
      seg_feat_channels (int): Num_filters of kernel & categroy branch convolution operation.
      stacked_convs (int): Times of convolution operation.
      num_grids (list[int]): List of feature map grids size.
      kernel_out_channels (int): Number of output channels in kernel branch.
      dcn_v2_stages (list): Which stage use dcn v2 in tower. It is between [0, stacked_convs).
      segm_strides (list[int]): List of segmentation area stride.
      solov2_loss (object): SOLOv2Loss instance.
      score_threshold (float): Threshold of categroy score.
      mask_nms (object): MaskMatrixNMS instance.
class_docstr_tok: ["Head","block","for","SOLOv2","network","Args",":","num_classes","(","int",")",":","Number","of","output","classes",".","in_channels","(","int",")",":","Number","of","input","channels",".","seg_feat_channels","(","int",")",":","Num_filters","of","kernel","&","categroy","branch","convolution","operation",".","stacked_convs","(","int",")",":","Times","of","convolution","operation",".","num_grids","(","list","[","int","]",")",":","List","of","feature","map","grids","size",".","kernel_out_channels","(","int",")",":","Number","of","output","channels","in","kernel","branch",".","dcn_v2_stages","(","list",")",":","Which","stage","use","dcn","v2","in","tower",".","It","is","between","[","0",",","stacked_convs",")",".","segm_strides","(","list","[","int","]",")",":","List","of","segmentation","area","stride",".","solov2_loss","(","object",")",":","SOLOv2Loss","instance",".","score_threshold","(","float",")",":","Threshold","of","categroy","score",".","mask_nms","(","object",")",":","MaskMatrixNMS","instance","."]
code: def _points_nms(self, heat, kernel_size=2):
      hmax = F.max_pool2d(
          heat, kernel_size=kernel_size, stride=1, padding=1
      )
      keep = paddle.cast((hmax[:, :, :-1, :-1] == heat), "float32")
      return heat * keep
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import ParamAttr
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import Normal, Constant
  from ppdet.modeling.layers import ConvNormLayer, MaskMatrixNMS, DropBlock
  from ppdet.core.workspace import register
  from six.moves import zip
  import numpy
label_desc: Use image node_id 2 for calling the SOLOv2Head obj's underlying member method code with example usage: obj._points_nms(heat, kernel_size) and returns: unknown