class_docstr: A pseudo sampler that does not do sampling actually.
class_docstr_tok: ["A","pseudo","sampler","that","does","not","do","sampling","actually","."]
docstr: Directly returns the positive and negative indices  of samples.
  
  Args:
      assign_result (:obj:`AssignResult`): Assigned results
      bboxes (paddle.Tensor): Bounding boxes
      gt_bboxes (paddle.Tensor): Ground truth boxes
  
  Returns:
      :obj:`SamplingResult`: sampler results
docstr_tok: ["Directly","returns","the","positive","and","negative","indices","of","samples",".","Args",":","assign_result","(",":","obj",":","`","AssignResult","`",")",":","Assigned","results","bboxes","(","paddle.Tensor",")",":","Bounding","boxes","gt_bboxes","(","paddle.Tensor",")",":","Ground","truth","boxes","Returns",":",":","obj",":","`","SamplingResult","`",":","sampler","results"]
code: def sample(self, assign_result, bboxes, gt_bboxes, *args, **kwargs):
      """Directly returns the positive and negative indices  of samples.
  
      Args:
          assign_result (:obj:`AssignResult`): Assigned results
          bboxes (paddle.Tensor): Bounding boxes
          gt_bboxes (paddle.Tensor): Ground truth boxes
  
      Returns:
          :obj:`SamplingResult`: sampler results
      """
      pos_inds = paddle.nonzero(
          assign_result.gt_inds > 0, as_tuple=False
      ).squeeze(-1)
      neg_inds = paddle.nonzero(
          assign_result.gt_inds == 0, as_tuple=False
      ).squeeze(-1)
      gt_flags = paddle.zeros([bboxes.shape[0]], dtype="int32")
      sampling_result = SamplingResult(
          pos_inds, neg_inds, bboxes, gt_bboxes, assign_result, gt_flags
      )
      return sampling_result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from ppdet.core.workspace import register
label_desc: Use image node_id 4 for calling the PseudoSampler obj's underlying member method code with example usage: obj.sample(assign_result, bboxes, gt_bboxes) and returns: sampling_result