code: def __init__(
      self,
      num_points=72,
      prior_feat_channels=64,
      fc_hidden_dim=64,
      num_priors=192,
      img_w=800,
      img_h=320,
      ori_img_h=590,
      cut_height=270,
      num_classes=5,
      num_fc=2,
      refine_layers=3,
      sample_points=36,
      conf_threshold=0.4,
      nms_thres=0.5,
      max_lanes=4,
      loss="CLRNetLoss",
  ):
      super(CLRHead, self).__init__()
      self.img_w = img_w
      self.img_h = img_h
      self.n_strips = num_points - 1
      self.n_offsets = num_points
      self.num_priors = num_priors
      self.sample_points = sample_points
      self.refine_layers = refine_layers
      self.num_classes = num_classes
      self.fc_hidden_dim = fc_hidden_dim
      self.ori_img_h = ori_img_h
      self.cut_height = cut_height
      self.conf_threshold = conf_threshold
      self.nms_thres = nms_thres
      self.max_lanes = max_lanes
      self.prior_feat_channels = prior_feat_channels
      self.loss = loss
      self.register_buffer(
          name="sample_x_indexs",
          tensor=(
              paddle.linspace(
                  start=0,
                  stop=1,
                  num=self.sample_points,
                  dtype=paddle.float32,
              )
              * self.n_strips
          ).astype(dtype="int64"),
      )
      self.register_buffer(
          name="prior_feat_ys",
          tensor=paddle.flip(
              x=(
                  1
                  - self.sample_x_indexs.astype("float32")
                  / self.n_strips
              ),
              axis=[-1],
          ),
      )
      self.register_buffer(
          name="prior_ys",
          tensor=paddle.linspace(
              start=1, stop=0, num=self.n_offsets
          ).astype("float32"),
      )
      self.prior_feat_channels = prior_feat_channels
      self._init_prior_embeddings()
      (
          init_priors,
          priors_on_featmap,
      ) = self.generate_priors_from_embeddings()
      self.register_buffer(name="priors", tensor=init_priors)
      self.register_buffer(
          name="priors_on_featmap", tensor=priors_on_featmap
      )
      self.seg_decoder = SegDecoder(
          self.img_h,
          self.img_w,
          self.num_classes,
          self.prior_feat_channels,
          self.refine_layers,
      )
      reg_modules = list()
      cls_modules = list()
      for _ in range(num_fc):
          reg_modules += [*LinearModule(self.fc_hidden_dim)]
          cls_modules += [*LinearModule(self.fc_hidden_dim)]
      self.reg_modules = nn.LayerList(sublayers=reg_modules)
      self.cls_modules = nn.LayerList(sublayers=cls_modules)
      self.roi_gather = ROIGather(
          self.prior_feat_channels,
          self.num_priors,
          self.sample_points,
          self.fc_hidden_dim,
          self.refine_layers,
      )
      self.reg_layers = nn.Linear(
          in_features=self.fc_hidden_dim,
          out_features=self.n_offsets + 1 + 2 + 1,
          bias_attr=True,
      )
      self.cls_layers = nn.Linear(
          in_features=self.fc_hidden_dim, out_features=2, bias_attr=True
      )
      self.init_weights()
  
imports: import math
  import paddle
  import numpy
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from ppdet.modeling.initializer import normal_
  from ppdet.modeling.lane_utils import Lane
  from ppdet.modeling.losses import line_iou
  from ppdet.modeling.clrnet_utils import ROIGather, LinearModule, SegDecoder
label_desc: Use image node_id 1 to create a new CLRHead object from inherited base classes: nn with example: obj = CLRHead(num_points, prior_feat_channels, fc_hidden_dim, num_priors, img_w, img_h, ori_img_h, cut_height, num_classes, num_fc, refine_layers, sample_points, conf_threshold, nms_thres, max_lanes, loss)