code: def forward(
      self,
      loss_confs,
      loss_boxes,
      loss_ides,
      loss_params_cls,
      loss_params_reg,
      loss_params_ide,
      targets,
  ):
      assert len(loss_confs) == len(loss_boxes) == len(loss_ides)
      assert (
          len(loss_params_cls)
          == len(loss_params_reg)
          == len(loss_params_ide)
      )
      assert len(loss_confs) == len(loss_params_cls)
  
      batchsize = targets["gt_bbox"].shape[0]
      nTargets = (
          paddle.nonzero(paddle.sum(targets["gt_bbox"], axis=2)).shape[
              0
          ]
          / batchsize
      )
      nTargets = paddle.to_tensor(nTargets, dtype="float32")
      nTargets.stop_gradient = True
  
      jde_losses = []
      for i, (
          loss_conf,
          loss_box,
          loss_ide,
          l_conf_p,
          l_box_p,
          l_ide_p,
      ) in enumerate(
          zip(
              loss_confs,
              loss_boxes,
              loss_ides,
              loss_params_cls,
              loss_params_reg,
              loss_params_ide,
          )
      ):
          jde_loss = (
              l_conf_p(loss_conf)
              + l_box_p(loss_box)
              + l_ide_p(loss_ide)
          )
          jde_losses.append(jde_loss)
  
      loss_all = {
          "loss_conf": sum(loss_confs),
          "loss_box": sum(loss_boxes),
          "loss_ide": sum(loss_ides),
          "loss": sum(jde_losses),
          "nTargets": nTargets,
      }
      return loss_all
  
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
label_desc: Use image node_id 2 for calling the JDELoss obj's underlying member method code with example usage: obj.forward(loss_confs, loss_boxes, loss_ides, loss_params_cls, loss_params_reg, loss_params_ide, targets) and returns: loss_all