docstr: Args:
      out_transformer (Tuple): (feats: [num_levels, batch_size,
                                          num_queries, hidden_dim],
                      memory: [batch_size,
                          \sum_{l=0}^{L-1} H_l \cdot W_l, hidden_dim],
                      reference_points: [batch_size, num_queries, 2])
      body_feats (List(Tensor)): list[[B, C, H, W]]
      inputs (dict): dict(inputs)
docstr_tok: ["Args",":","out_transformer","(","Tuple",")",":","(","feats",":","[","num_levels",",","batch_size",",","num_queries",",","hidden_dim","]",",","memory",":","[","batch_size",",","\\sum_","{","l=0","}","^","{","L-1","}","H_l","\\cdot","W_l",",","hidden_dim","]",",","reference_points",":","[","batch_size",",","num_queries",",","2","]",")","body_feats","(","List","(","Tensor",")",")",":","list","[","[","B",",","C",",","H",",","W","]","]","inputs","(","dict",")",":","dict","(","inputs",")"]
code: def forward(self, out_transformer, body_feats, inputs=None):
      r"""
      Args:
          out_transformer (Tuple): (feats: [num_levels, batch_size,
                                              num_queries, hidden_dim],
                          memory: [batch_size,
                              \sum_{l=0}^{L-1} H_l \cdot W_l, hidden_dim],
                          reference_points: [batch_size, num_queries, 2])
          body_feats (List(Tensor)): list[[B, C, H, W]]
          inputs (dict): dict(inputs)
      """
      feats, memory, reference_points = out_transformer
      reference_points = inverse_sigmoid(reference_points.unsqueeze(0))
      outputs_bbox = self.bbox_head(feats)
  
      # It's equivalent to "outputs_bbox[:, :, :, :2] += reference_points",
      # but the gradient is wrong in paddle.
      outputs_bbox = paddle.concat(
          [
              outputs_bbox[:, :, :, :2] + reference_points,
              outputs_bbox[:, :, :, 2:],
          ],
          axis=-1,
      )
  
      outputs_bbox = F.sigmoid(outputs_bbox)
      outputs_logit = self.score_head(feats)
  
      if self.training:
          assert inputs is not None
          assert "gt_bbox" in inputs and "gt_class" in inputs
  
          return self.loss(
              outputs_bbox,
              outputs_logit,
              inputs["gt_bbox"],
              inputs["gt_class"],
          )
      else:
          return (outputs_bbox[-1], outputs_logit[-1], None)
  
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
  import pycocotools.mask
  from ..initializer import linear_init_, constant_
  from ..transformers.utils import inverse_sigmoid
label_desc: Use image node_id 4 for calling the DeformableDETRHead obj's underlying member method code with example usage: obj.forward(out_transformer, body_feats, inputs) and returns: self, outputs_bbox,  outputs_logit,  None