class_docstr: FCOSLoss of Consistency Regularization
code: def quality_focal_loss(
      self,
      stu_cls,
      targets,
      quality=None,
      weights=None,
      alpha=0.75,
      gamma=2.0,
      avg_factor="sum",
  ):
      stu_cls = F.sigmoid(stu_cls)
      if quality is not None:
          stu_cls = stu_cls * F.sigmoid(quality)
  
      focal_weight = (stu_cls - targets).abs().pow(gamma) * (
          targets > 0.0
      ).cast("float32") + alpha * (stu_cls - targets).abs().pow(
          gamma
      ) * (
          targets <= 0.0
      ).cast(
          "float32"
      )
  
      loss = (
          F.binary_cross_entropy(stu_cls, targets, reduction="none")
          * focal_weight
      )
  
      if weights is not None:
          loss = loss * weights.reshape([-1, 1])
      loss = paddle.sum(loss)
      if avg_factor is not None:
          loss = loss / avg_factor
      return loss
  
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 ppdet.modeling import ops
  from functools import partial
label_desc: Use image node_id 4 for calling the FCOSLossCR obj's underlying member method code with example usage: obj.quality_focal_loss(stu_cls, targets, quality, weights, alpha, gamma, avg_factor) and returns: loss