code: def __init__(
      self,
      cls_loss_weight=2.0,
      xyt_loss_weight=0.2,
      iou_loss_weight=2.0,
      seg_loss_weight=1.0,
      refine_layers=3,
      num_points=72,
      img_w=800,
      img_h=320,
      num_classes=5,
      ignore_label=255,
      bg_weight=0.4,
  ):
      super(CLRNetLoss, self).__init__()
      self.cls_loss_weight = cls_loss_weight
      self.xyt_loss_weight = xyt_loss_weight
      self.iou_loss_weight = iou_loss_weight
      self.seg_loss_weight = seg_loss_weight
      self.refine_layers = refine_layers
      self.img_w = img_w
      self.img_h = img_h
      self.n_strips = num_points - 1
      self.num_classes = num_classes
      self.ignore_label = ignore_label
      weights = paddle.ones(shape=[self.num_classes])
      weights[0] = bg_weight
      self.criterion = nn.NLLLoss(
          ignore_index=self.ignore_label, weight=weights
      )
  
file_path: PaddleDetection/ppdet/modeling/losses/clrnet_loss.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from ppdet.modeling.clrnet_utils import accuracy
  from ppdet.modeling.assigners.clrnet_assigner import assign
  from ppdet.modeling.losses.clrnet_line_iou_loss import liou_loss
label_desc: Use image node_id 1 to create a new CLRNetLoss object from inherited base classes: nn with example: obj = CLRNetLoss(cls_loss_weight, xyt_loss_weight, iou_loss_weight, seg_loss_weight, refine_layers, num_points, img_w, img_h, num_classes, ignore_label, bg_weight)