class_docstr: SOLOv2 network, see https://arxiv.org/abs/2003.10152
  
  Args:
      backbone (object): an backbone instance
      solov2_head (object): an `SOLOv2Head` instance
      mask_head (object): an `SOLOv2MaskHead` instance
      neck (object): neck of network, such as feature pyramid network instance
class_docstr_tok: ["SOLOv2","network",",","see","https",":","\/\/arxiv.org\/abs\/2003.10152","Args",":","backbone","(","object",")",":","an","backbone","instance","solov2_head","(","object",")",":","an","`","SOLOv2Head","`","instance","mask_head","(","object",")",":","an","`","SOLOv2MaskHead","`","instance","neck","(","object",")",":","neck","of","network",",","such","as","feature","pyramid","network","instance"]
code: def get_loss(
      self,
  ):
      loss = {}
      # get gt_ins_labels, gt_cate_labels, etc.
      gt_ins_labels, gt_cate_labels, gt_grid_orders = [], [], []
      fg_num = self.inputs["fg_num"]
      for i in range(len(self.solov2_head.seg_num_grids)):
          ins_label = "ins_label{}".format(i)
          if ins_label in self.inputs:
              gt_ins_labels.append(self.inputs[ins_label])
          cate_label = "cate_label{}".format(i)
          if cate_label in self.inputs:
              gt_cate_labels.append(self.inputs[cate_label])
          grid_order = "grid_order{}".format(i)
          if grid_order in self.inputs:
              gt_grid_orders.append(self.inputs[grid_order])
  
      loss_solov2 = self.solov2_head.get_loss(
          self.cate_pred_list,
          self.kernel_pred_list,
          self.seg_pred,
          gt_ins_labels,
          gt_cate_labels,
          gt_grid_orders,
          fg_num,
      )
      loss.update(loss_solov2)
      total_loss = paddle.add_n(list(loss.values()))
      loss.update({"loss": total_loss})
      return loss
  
file_path: PaddleDetection/ppdet/modeling/architectures/solov2.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from ppdet.core.workspace import register, create
  from .meta_arch import BaseArch
label_desc: Use image node_id 4 for calling the SOLOv2 obj's underlying member method code with example usage: obj.get_loss() and returns: loss