class_docstr: Head of `End-to-End Multi-Person Pose Estimation with Transformers`.
  
  Args:
      num_classes (int): Number of categories excluding the background.
      in_channels (int): Number of channels in the input feature map.
      num_query (int): Number of query in Transformer.
      num_kpt_fcs (int, optional): Number of fully-connected layers used in
          `FFN`, which is then used for the keypoint regression head.
          Default 2.
      transformer (obj:`mmcv.ConfigDict`|dict): ConfigDict is used for
          building the Encoder and Decoder. Default: None.
      sync_cls_avg_factor (bool): Whether to sync the avg_factor of
          all ranks. Default to False.
      positional_encoding (obj:`mmcv.ConfigDict`|dict):
          Config for position encoding.
      loss_cls (obj:`mmcv.ConfigDict`|dict): Config of the
          classification loss. Default `CrossEntropyLoss`.
      loss_kpt (obj:`mmcv.ConfigDict`|dict): Config of the
          regression loss. Default `L1Loss`.
      loss_oks (obj:`mmcv.ConfigDict`|dict): Config of the
          regression oks loss. Default `OKSLoss`.
      loss_hm (obj:`mmcv.ConfigDict`|dict): Config of the
          regression heatmap loss. Default `NegLoss`.
      as_two_stage (bool) : Whether to generate the proposal from
          the outputs of encoder.
      with_kpt_refine (bool): Whether to refine the reference points
          in the decoder. Defaults to True.
      test_cfg (obj:`mmcv.ConfigDict`|dict): Testing config of
          transformer head.
      init_cfg (dict or list[dict], optional): Initialization config dict.
          Default: None.
class_docstr_tok: ["Head","of","`","End-to-End","Multi-Person","Pose","Estimation","with","Transformers","`",".","Args",":","num_classes","(","int",")",":","Number","of","categories","excluding","the","background",".","in_channels","(","int",")",":","Number","of","channels","in","the","input","feature","map",".","num_query","(","int",")",":","Number","of","query","in","Transformer",".","num_kpt_fcs","(","int",",","optional",")",":","Number","of","fully-connected","layers","used","in","`","FFN","`",",","which","is","then","used","for","the","keypoint","regression","head",".","Default","2.","transformer","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","ConfigDict","is","used","for","building","the","Encoder","and","Decoder",".","Default",":","None",".","sync_cls_avg_factor","(","bool",")",":","Whether","to","sync","the","avg_factor","of","all","ranks",".","Default","to","False",".","positional_encoding","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Config","for","position","encoding",".","loss_cls","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Config","of","the","classification","loss",".","Default","`","CrossEntropyLoss","`",".","loss_kpt","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Config","of","the","regression","loss",".","Default","`","L1Loss","`",".","loss_oks","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Config","of","the","regression","oks","loss",".","Default","`","OKSLoss","`",".","loss_hm","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Config","of","the","regression","heatmap","loss",".","Default","`","NegLoss","`",".","as_two_stage","(","bool",")",":","Whether","to","generate","the","proposal","from","the","outputs","of","encoder",".","with_kpt_refine","(","bool",")",":","Whether","to","refine","the","reference","points","in","the","decoder",".","Defaults","to","True",".","test_cfg","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Testing","config","of","transformer","head",".","init_cfg","(","dict","or","list","[","dict","]",",","optional",")",":","Initialization","config","dict",".","Default",":","None","."]
docstr: Test det bboxes without test-time augmentation.
  
  Args:
      feats (tuple[paddle.Tensor]): Multi-level features from the
          upstream network, each is a 4D-tensor.
      img_metas (list[dict]): List of image information.
      rescale (bool, optional): Whether to rescale the results.
          Defaults to False.
  
  Returns:
      list[tuple[Tensor, Tensor, Tensor]]: Each item in result_list is
          3-tuple. The first item is ``bboxes`` with shape (n, 5),
          where 5 represent (tl_x, tl_y, br_x, br_y, score).
          The shape of the second tensor in the tuple is ``labels``
          with shape (n,). The third item is ``kpts`` with shape
          (n, K, 3), in [p^{1}_x, p^{1}_y, p^{1}_v, p^{K}_x, p^{K}_y,
          p^{K}_v] format.
docstr_tok: ["Test","det","bboxes","without","test-time","augmentation",".","Args",":","feats","(","tuple","[","paddle.Tensor","]",")",":","Multi-level","features","from","the","upstream","network",",","each","is","a","4D-tensor",".","img_metas","(","list","[","dict","]",")",":","List","of","image","information",".","rescale","(","bool",",","optional",")",":","Whether","to","rescale","the","results",".","Defaults","to","False",".","Returns",":","list","[","tuple","[","Tensor",",","Tensor",",","Tensor","]","]",":","Each","item","in","result_list","is","3-tuple",".","The","first","item","is","``","bboxes","``","with","shape","(","n",",","5",")",",","where","5","represent","(","tl_x",",","tl_y",",","br_x",",","br_y",",","score",")",".","The","shape","of","the","second","tensor","in","the","tuple","is","``","labels","``","with","shape","(","n",",",")",".","The","third","item","is","``","kpts","``","with","shape","(","n",",","K",",","3",")",",","in","[","p^","{","1","}","_x",",","p^","{","1","}","_y",",","p^","{","1","}","_v",",","p^","{","K","}","_x",",","p^","{","K","}","_y",",","p^","{","K","}","_v","]","format","."]
code: def simple_test(self, feats, img_metas, rescale=False):
      """Test det bboxes without test-time augmentation.
  
      Args:
          feats (tuple[paddle.Tensor]): Multi-level features from the
              upstream network, each is a 4D-tensor.
          img_metas (list[dict]): List of image information.
          rescale (bool, optional): Whether to rescale the results.
              Defaults to False.
  
      Returns:
          list[tuple[Tensor, Tensor, Tensor]]: Each item in result_list is
              3-tuple. The first item is ``bboxes`` with shape (n, 5),
              where 5 represent (tl_x, tl_y, br_x, br_y, score).
              The shape of the second tensor in the tuple is ``labels``
              with shape (n,). The third item is ``kpts`` with shape
              (n, K, 3), in [p^{1}_x, p^{1}_y, p^{1}_v, p^{K}_x, p^{K}_y,
              p^{K}_v] format.
      """
      # forward of this head requires img_metas
      outs = self.forward(feats, img_metas)
      results_list = self.get_bboxes(*outs, img_metas, rescale=rescale)
      return results_list
  
imports: import copy
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  import paddle.distributed
  from ..transformers.petr_transformer import inverse_sigmoid, masked_fill
  from ..initializer import constant_, normal_
  from functools import partial
label_desc: Use image node_id 15 for calling the PETRHead obj's underlying member method code with example usage: obj.simple_test(feats, img_metas, rescale) and returns: results_list