code: def compute_losses(self, net_out, data):
      cls_critn, center_critn, offset_critn = self.criteria["types"]
      cls_coef, center_coef, offset_coef = self.criteria["coef"]
      cls_loss = cls_critn(
          net_out["sem_out"],
          data["sem_label"],
          semantic_weights=data["sem_seg_weights"],
      )
      center_loss = center_critn(net_out["center"], data["center"])
      if "center_weights" in data:
          center_weights = data["center_weights"]
          center_loss = center_loss * center_weights
          if center_weights.sum() > 0:
              center_loss = center_loss.sum() / center_weights.sum()
          else:
              center_loss = center_loss.sum() * 0
      offset_loss = offset_critn(net_out["offset"], data["offset"])
      if "offset_weights" in data:
          offset_weights = data["offset_weights"]
          offset_loss = offset_loss * offset_weights
          if offset_weights.sum() > 0:
              offset_loss = offset_loss.sum() / offset_weights.sum()
          else:
              offset_loss = offset_loss.sum() * 0
      return [
          cls_coef * cls_loss,
          center_coef * center_loss,
          offset_coef * offset_loss,
      ]
  
file_path: PaddleSeg/contrib/PanopticSeg/paddlepanseg/runners/panoptic_deeplab_runner.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddlepanseg.cvlibs import manager
  from paddlepanseg.core.runner import PanSegRunner
label_desc: Use image node_id 1 for calling the PanopticDeepLabRunner obj's underlying member method code with example usage: obj.compute_losses(net_out, data) and returns: list