class_docstr: The PointHead implementation based on PaddlePaddle.
  
  PointHead use shared multi-layer perceptron (equivalent to
  nn.Conv1D) to predict the logit of input points. The fine-grained feature
  and coarse feature will be concatenate together for predication.
  
  The original article refers to:
  Kirillov A , Wu Y , He K , et al "PointRend: Image Segmentation As Rendering."
  (https://arxiv.org/abs/1912.08193)
  
  Args:
      num_classes (int): Number of classes for logits. Default: 19.
      num_fcs (int, optional): Number of fc layers in the head. Default: 3.
      in_channels (list): input channels of fc block. Default: [256].
      out_channels (int, optional): Fc block's output channels. Default: 256.
      in_index (list): The indexs of input features to use. Default: [0].
      num_points (int, optional): The number of point in training mode. Default: 2048.
      oversample_ratio (int, optional): The sample ratio of points when in training mode.
          sampled_point = num_points * oversample_ratio. Default: 3.
      importance_sample_ratio(float, optional): The importance sample ratio for compute num_uncertain_points. Default: 0.75.
      scale_factor(int, optional): The scale factor of F.interpolate in refine seg logits stage when in inference. Default: 2.
      subdivision_steps(int, optional): Then refine steps in refine seg logits stage when in inference. Default: 2.
      subdivision_num_points(int, optional): The points number for refine seg logits when in inference. Default: 8196.
      dropout_ratio(float, optional): If the dropout_ratio >0, to use Dropout before output and the p of dropout is dropout_ratio. Default: 0.1.
      coarse_pred_each_layer(bool, optional): Whether concatenate coarse feature with
          the output of each fc layer. Default: True.
      conv_cfg(str): The config of Conv. Default: 'Conv1D'.
      input_transform(str): The features transform method of inputs.
          it can be found in function '_transform_inputs'. Defalut: 'multiple_select'.
      align_corners (bool, optional): An argument of F.interpolate. It should be set to False when the feature size is even,
          e.g. 1024x512, otherwise it is True, e.g. 769x769. Default: False.
class_docstr_tok: ["The","PointHead","implementation","based","on","PaddlePaddle",".","PointHead","use","shared","multi-layer","perceptron","(","equivalent","to","nn.Conv1D",")","to","predict","the","logit","of","input","points",".","The","fine-grained","feature","and","coarse","feature","will","be","concatenate","together","for","predication",".","The","original","article","refers","to",":","Kirillov","A",",","Wu","Y",",","He","K",",","et","al","``","PointRend",":","Image","Segmentation","As","Rendering",".","''","(","https",":","\/\/arxiv.org\/abs\/1912.08193",")","Args",":","num_classes","(","int",")",":","Number","of","classes","for","logits",".","Default",":","19.","num_fcs","(","int",",","optional",")",":","Number","of","fc","layers","in","the","head",".","Default",":","3.","in_channels","(","list",")",":","input","channels","of","fc","block",".","Default",":","[","256","]",".","out_channels","(","int",",","optional",")",":","Fc","block","'s","output","channels",".","Default",":","256.","in_index","(","list",")",":","The","indexs","of","input","features","to","use",".","Default",":","[","0","]",".","num_points","(","int",",","optional",")",":","The","number","of","point","in","training","mode",".","Default",":","2048.","oversample_ratio","(","int",",","optional",")",":","The","sample","ratio","of","points","when","in","training","mode",".","sampled_point","=","num_points","*","oversample_ratio",".","Default",":","3.","importance_sample_ratio","(","float",",","optional",")",":","The","importance","sample","ratio","for","compute","num_uncertain_points",".","Default",":","0.75.","scale_factor","(","int",",","optional",")",":","The","scale","factor","of","F.interpolate","in","refine","seg","logits","stage","when","in","inference",".","Default",":","2.","subdivision_steps","(","int",",","optional",")",":","Then","refine","steps","in","refine","seg","logits","stage","when","in","inference",".","Default",":","2.","subdivision_num_points","(","int",",","optional",")",":","The","points","number","for","refine","seg","logits","when","in","inference",".","Default",":","8196.","dropout_ratio","(","float",",","optional",")",":","If","the","dropout_ratio",">","0",",","to","use","Dropout","before","output","and","the","p","of","dropout","is","dropout_ratio",".","Default",":","0.1.","coarse_pred_each_layer","(","bool",",","optional",")",":","Whether","concatenate","coarse","feature","with","the","output","of","each","fc","layer",".","Default",":","True",".","conv_cfg","(","str",")",":","The","config","of","Conv",".","Default",":","'Conv1D","'",".","input_transform","(","str",")",":","The","features","transform","method","of","inputs",".","it","can","be","found","in","function","'_transform_inputs","'",".","Defalut",":","'multiple_select","'",".","align_corners","(","bool",",","optional",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","feature","size","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","Default",":","False","."]
docstr: paddle version scatter : equal to pytorch version scatter(-1,point_indices,point_logits).
  
  Args:
      refined_seg_logits(Tensor): shape=[batch_size, channels, height * width]
      point_indices(Tensor): shape=[batch_size, channels, height * width]
      point_logits(Tensor): shape[batch_size, channels, height * width]
  Returns:
      scattered refined_seg_logits(Tensor).
code: def scatter_paddle(
      self, refined_seg_logits, point_indices, point_logits
  ):
      """
      paddle version scatter : equal to pytorch version scatter(-1,point_indices,point_logits).
  
      Args:
          refined_seg_logits(Tensor): shape=[batch_size, channels, height * width]
          point_indices(Tensor): shape=[batch_size, channels, height * width]
          point_logits(Tensor): shape[batch_size, channels, height * width]
      Returns:
          scattered refined_seg_logits(Tensor).
      """
  
      original_shape = paddle.shape(
          refined_seg_logits
      )  # [batch_size, channels, height * width]
      new_refined_seg_logits = refined_seg_logits.flatten(
          0, 1
      )  # [N*C,H*W]
      offsets = (
          paddle.arange(paddle.shape(new_refined_seg_logits)[0])
          * paddle.shape(new_refined_seg_logits)[1]
      ).unsqueeze(
          -1
      )  # [N*C,1]
      point_indices = point_indices.flatten(0, 1)  # [N*C,H*W]
      new_point_indices = (point_indices + offsets).flatten()
      point_logits = point_logits.flatten()  # [N*C*H*W]
      refined_seg_logits = paddle.scatter(
          refined_seg_logits.flatten(),
          new_point_indices,
          point_logits,
          overwrite=True,
      )
      return refined_seg_logits.reshape(shape=original_shape)
  
imports: import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 8 for calling the PointHead obj's underlying member method code with example usage: obj.scatter_paddle(refined_seg_logits, point_indices, point_logits) and returns: refined_seg_logits