code: def obj_weighted_reg(self, sx, sy, sw, sh, tx, ty, tw, th, tobj):
      loss_x = ops.sigmoid_cross_entropy_with_logits(sx, F.sigmoid(tx))
      loss_y = ops.sigmoid_cross_entropy_with_logits(sy, F.sigmoid(ty))
      loss_w = paddle.abs(sw - tw)
      loss_h = paddle.abs(sh - th)
      loss = paddle.add_n([loss_x, loss_y, loss_w, loss_h])
      weighted_loss = paddle.mean(loss * F.sigmoid(tobj))
      return weighted_loss
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from ppdet.core.workspace import register
  from ppdet.modeling import ops
  from ppdet.modeling.losses.iou_loss import GIoULoss
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the DistillYOLOv3Loss obj's underlying member method code with example usage: obj.obj_weighted_reg(sx, sy, sw, sh, tx, ty, tw, th, tobj) and returns: weighted_loss