code: def cls_loss(self, pcls, tcls):
      if self.label_smooth:
          delta = min(1.0 / self.num_classes, 1.0 / 40)
          pos, neg = 1 - delta, delta
          # 1 for positive, 0 for negative
          tcls = pos * paddle.cast(
              tcls > 0.0, dtype=tcls.dtype
          ) + neg * paddle.cast(tcls <= 0.0, dtype=tcls.dtype)
  
      loss_cls = F.binary_cross_entropy_with_logits(
          pcls, tcls, reduction="none"
      )
      return loss_cls
  
file_path: PaddleDetection/ppdet/modeling/losses/yolo_loss.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from ..bbox_utils import decode_yolo, xywh2xyxy, batch_iou_similarity
label_desc: Use image node_id 3 for calling the YOLOv3Loss obj's underlying member method code with example usage: obj.cls_loss(pcls, tcls) and returns: loss_cls