class_docstr: FCOSLoss of Consistency Regularization
code: def calcualate_iou(self, gt_bbox, predict_bbox):
      # bbox area
      gt_area = (gt_bbox[:, 2] - gt_bbox[:, 0]) * (
          gt_bbox[:, 3] - gt_bbox[:, 1]
      )
      predict_area = (predict_bbox[:, 2] - predict_bbox[:, 0]) * (
          predict_bbox[:, 3] - predict_bbox[:, 1]
      )
      # overlop area
      lt = paddle.fmax(gt_bbox[:, None, :2], predict_bbox[None, :, :2])
      rb = paddle.fmin(gt_bbox[:, None, 2:], predict_bbox[None, :, 2:])
      wh = paddle.clip(rb - lt, min=0)
      overlap = wh[..., 0] * wh[..., 1]
      # iou
      iou = overlap / (
          gt_area[:, None] + predict_area[None, :] - overlap
      )
      return iou
  
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 8 for calling the FCOSLossCR obj's underlying member method code with example usage: obj.calcualate_iou(gt_bbox, predict_bbox) and returns: iou