class_docstr: assigner of rbox
  Args:
      pos_iou_thr (float): threshold of pos samples
      neg_iou_thr (float): threshold of neg samples
      min_iou_thr (float): the min threshold of samples
      ignore_iof_thr (int): the ignored threshold
class_docstr_tok: ["assigner","of","rbox","Args",":","pos_iou_thr","(","float",")",":","threshold","of","pos","samples","neg_iou_thr","(","float",")",":","threshold","of","neg","samples","min_iou_thr","(","float",")",":","the","min","threshold","of","samples","ignore_iof_thr","(","int",")",":","the","ignored","threshold"]
docstr: Args:
      anchor: M x 4
  
  Returns:
docstr_tok: ["Args",":","anchor",":","M","x","4","Returns",":"]
code: def anchor_valid(self, anchors):
      """
  
      Args:
          anchor: M x 4
  
      Returns:
  
      """
      if anchors.ndim == 3:
          anchors = anchors.reshape(-1, anchors.shape[-1])
      assert anchors.ndim == 2
      anchor_num = anchors.shape[0]
      anchor_valid = np.ones((anchor_num), np.int32)
      anchor_inds = np.arange(anchor_num)
      return anchor_inds
  
imports: import sys
  import paddle
  from ppdet.core.workspace import register, serializable
  from .target import rpn_anchor_target, generate_proposal_target, generate_mask_target, libra_generate_proposal_target
  import numpy
label_desc: Use image node_id 2 for calling the RBoxAssigner obj's underlying member method code with example usage: obj.anchor_valid(anchors) and returns: anchor_inds