code: def _get_decoder_input(
      self,
      memory,
      spatial_shapes,
      memory_mask=None,
      denoising_class=None,
      denoising_bbox_unact=None,
  ):
      bs, _, _ = memory.shape
      # prepare input for decoder
      output_memory, output_anchors = self._get_encoder_output_anchors(
          memory, spatial_shapes, memory_mask
      )
      enc_outputs_class = self.enc_score_head(output_memory)
      enc_outputs_coord_unact = (
          self.enc_bbox_head(output_memory) + output_anchors
      )
  
      _, topk_ind = paddle.topk(
          enc_outputs_class.max(-1), self.num_queries, axis=1
      )
      # extract region proposal boxes
      batch_ind = paddle.arange(end=bs).astype(topk_ind.dtype)
      batch_ind = batch_ind.unsqueeze(-1).tile([1, self.num_queries])
      topk_ind = paddle.stack([batch_ind, topk_ind], axis=-1)
      reference_points_unact = paddle.gather_nd(
          enc_outputs_coord_unact, topk_ind
      )  # unsigmoided.
      enc_topk_bboxes = F.sigmoid(reference_points_unact)
      if denoising_bbox_unact is not None:
          reference_points_unact = paddle.concat(
              [denoising_bbox_unact, reference_points_unact], 1
          )
      enc_topk_logits = paddle.gather_nd(enc_outputs_class, topk_ind)
  
      # extract region features
      if self.learnt_init_query:
          target = self.tgt_embed.weight.unsqueeze(0).tile([bs, 1, 1])
      else:
          target = paddle.gather_nd(output_memory, topk_ind).detach()
      if denoising_class is not None:
          target = paddle.concat([denoising_class, target], 1)
  
      return (
          target,
          reference_points_unact.detach(),
          enc_topk_bboxes,
          enc_topk_logits,
      )
  
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 paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from ppdet.core.workspace import register
  from ..layers import MultiHeadAttention
  from .position_encoding import PositionEmbedding
  from ..heads.detr_head import MLP
  from .deformable_transformer import MSDeformableAttention, DeformableTransformerEncoderLayer, DeformableTransformerEncoder
  from ..initializer import linear_init_, constant_, xavier_uniform_, normal_, bias_init_with_prob
  from .utils import _get_clones, get_valid_ratio, get_contrastive_denoising_training_group, get_sine_pos_embed, inverse_sigmoid
label_desc: Use image node_id 8 for calling the DINOTransformer obj's underlying member method code with example usage: obj._get_decoder_input(memory, spatial_shapes, memory_mask, denoising_class, denoising_bbox_unact) and returns: target,  reference_points_unact,  enc_topk_bboxes,  enc_topk_logits