class_docstr: RepPoint head.
  
  Args:
      point_feat_channels (int): Number of channels of points features.
      gradient_mul (float): The multiplier to gradients from
          points refinement and recognition.
      point_strides (Iterable): points strides.
      point_base_scale (int): bbox scale for assigning labels.
      loss_cls (dict): Config of classification loss.
      loss_bbox_init (dict): Config of initial points loss.
      loss_bbox_refine (dict): Config of points loss in refinement.
      use_grid_points (bool): If we use bounding box representation, the
      reppoints is represented as grid points on the bounding box.
      center_init (bool): Whether to use center point assignment.
      transform_method (str): The methods to transform RepPoints to bbox.
class_docstr_tok: ["RepPoint","head",".","Args",":","point_feat_channels","(","int",")",":","Number","of","channels","of","points","features",".","gradient_mul","(","float",")",":","The","multiplier","to","gradients","from","points","refinement","and","recognition",".","point_strides","(","Iterable",")",":","points","strides",".","point_base_scale","(","int",")",":","bbox","scale","for","assigning","labels",".","loss_cls","(","dict",")",":","Config","of","classification","loss",".","loss_bbox_init","(","dict",")",":","Config","of","initial","points","loss",".","loss_bbox_refine","(","dict",")",":","Config","of","points","loss","in","refinement",".","use_grid_points","(","bool",")",":","If","we","use","bounding","box","representation",",","the","reppoints","is","represented","as","grid","points","on","the","bounding","box",".","center_init","(","bool",")",":","Whether","to","use","center","point","assignment",".","transform_method","(","str",")",":","The","methods","to","transform","RepPoints","to","bbox","."]
docstr: Forward feature map of a single FPN level.
docstr_tok: ["Forward","feature","map","of","a","single","FPN","level","."]
code: def forward_single(self, x):
      """Forward feature map of a single FPN level."""
      dcn_base_offset = self.dcn_base_offset.type_as(x)
      # If we use center_init, the initial reppoints is from center points.
      # If we use bounding bbox representation, the initial reppoints is
      #   from regular grid placed on a pre-defined bbox.
      if self.use_grid_points or not self.center_init:
          scale = self.point_base_scale / 2
          points_init = dcn_base_offset / dcn_base_offset.max() * scale
          bbox_init = x.new_tensor([-scale, -scale, scale, scale]).view(
              1, 4, 1, 1
          )
      else:
          points_init = 0
      cls_feat = x
      pts_feat = x
      for cls_conv in self.cls_convs:
          cls_feat = cls_conv(cls_feat)
      for reg_conv in self.reg_convs:
          pts_feat = reg_conv(pts_feat)
      # initialize reppoints
      pts_out_init = self.reppoints_pts_init_out(
          self.relu(self.reppoints_pts_init_conv(pts_feat))
      )
      if self.use_grid_points:
          pts_out_init, bbox_out_init = self.gen_grid_from_reg(
              pts_out_init, bbox_init.detach()
          )
      else:
          pts_out_init = pts_out_init + points_init
      # refine and classify reppoints
      pts_out_init_grad_mul = (
          1 - self.gradient_mul
      ) * pts_out_init.detach() + self.gradient_mul * pts_out_init
      dcn_offset = pts_out_init_grad_mul - dcn_base_offset
      cls_out = self.reppoints_cls_out(
          self.relu(self.reppoints_cls_conv(cls_feat, dcn_offset))
      )
      pts_out_refine = self.reppoints_pts_refine_out(
          self.relu(
              self.reppoints_pts_refine_conv(pts_feat, dcn_offset)
          )
      )
      if self.use_grid_points:
          pts_out_refine, bbox_out_refine = self.gen_grid_from_reg(
              pts_out_refine, bbox_out_init.detach()
          )
      else:
          pts_out_refine = pts_out_refine + pts_out_init.detach()
      return cls_out, pts_out_init, pts_out_refine
  
imports: import numpy
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, bias_init_with_prob, normal_init
  from mmcv.ops import DeformConv2d
  from mmdet.core import PointGenerator, build_assigner, build_sampler, images_to_levels, multi_apply, multiclass_nms, unmap
  from ..builder import HEADS, build_loss
  from .anchor_free_head import AnchorFreeHead
label_desc: Use image node_id 7 for calling the RepPointsHead obj's underlying member method code with example usage: obj.forward_single(x) and returns: cls_out,  pts_out_init,  pts_out_refine