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: Initialize layers of the head.
docstr_tok: ["Initialize","layers","of","the","head","."]
code: def _init_layers(self):
      """Initialize layers of the head."""
      self.relu = nn.ReLU(inplace=True)
      self.cls_convs = nn.ModuleList()
      self.reg_convs = nn.ModuleList()
      for i in range(self.stacked_convs):
          chn = self.in_channels if i == 0 else self.feat_channels
          self.cls_convs.append(
              ConvModule(
                  chn,
                  self.feat_channels,
                  3,
                  stride=1,
                  padding=1,
                  conv_cfg=self.conv_cfg,
                  norm_cfg=self.norm_cfg,
              )
          )
          self.reg_convs.append(
              ConvModule(
                  chn,
                  self.feat_channels,
                  3,
                  stride=1,
                  padding=1,
                  conv_cfg=self.conv_cfg,
                  norm_cfg=self.norm_cfg,
              )
          )
      pts_out_dim = 4 if self.use_grid_points else 2 * self.num_points
      self.reppoints_cls_conv = DeformConv2d(
          self.feat_channels,
          self.point_feat_channels,
          self.dcn_kernel,
          1,
          self.dcn_pad,
      )
      self.reppoints_cls_out = nn.Conv2d(
          self.point_feat_channels, self.cls_out_channels, 1, 1, 0
      )
      self.reppoints_pts_init_conv = nn.Conv2d(
          self.feat_channels, self.point_feat_channels, 3, 1, 1
      )
      self.reppoints_pts_init_out = nn.Conv2d(
          self.point_feat_channels, pts_out_dim, 1, 1, 0
      )
      self.reppoints_pts_refine_conv = DeformConv2d(
          self.feat_channels,
          self.point_feat_channels,
          self.dcn_kernel,
          1,
          self.dcn_pad,
      )
      self.reppoints_pts_refine_out = nn.Conv2d(
          self.point_feat_channels, pts_out_dim, 1, 1, 0
      )
  
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 2 for calling the RepPointsHead obj's underlying member method code with example usage: obj._init_layers() without return types