class_docstr: Used in RetinaNet proposed in paper https://arxiv.org/pdf/1708.02002.pdf
      
class_docstr_tok: ["Used","in","RetinaNet","proposed","in","paper","https",":","\/\/arxiv.org\/pdf\/1708.02002.pdf"]
code: def decode(
      self, anchors, cls_logits, bboxes_reg, im_shape, scale_factor
  ):
      batch_bboxes = []
      batch_scores = []
      for img_id in range(cls_logits[0].shape[0]):
          num_lvls = len(cls_logits)
          cls_scores_list = [
              cls_logits[i][img_id] for i in range(num_lvls)
          ]
          bbox_preds_list = [
              bboxes_reg[i][img_id] for i in range(num_lvls)
          ]
          bboxes, scores = self.get_bboxes_single(
              anchors,
              cls_scores_list,
              bbox_preds_list,
              im_shape[img_id],
              scale_factor[img_id],
          )
          batch_bboxes.append(bboxes)
          batch_scores.append(scores)
      batch_bboxes = paddle.stack(batch_bboxes, axis=0)
      batch_scores = paddle.stack(batch_scores, axis=0)
      return batch_bboxes, batch_scores
  
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 paddle.nn.initializer import Normal, Constant
  from ppdet.modeling.bbox_utils import bbox2delta, delta2bbox
  from ppdet.modeling.heads.fcos_head import FCOSFeat
  from ppdet.core.workspace import register
label_desc: Use image node_id 5 for calling the RetinaHead obj's underlying member method code with example usage: obj.decode(anchors, cls_logits, bboxes_reg, im_shape, scale_factor) and returns: batch_bboxes,  batch_scores