def _filter_top_n(self, proposals, scores):
order = tf.py_func(arg_sort_op, [tf.reshape(scores, (-1,))], [tf.int64])[0]
if self._debug:
order = tf.Print(order, [tf.shape(order), tf.shape(proposals), tf.shape(scores)], message='order shape: ')
if self._pre_nms_top_n > 0:
order = tf.gather(order, tf.range(0, self._pre_nms_top_n))
proposals = tf.gather(proposals, order)
scores = tf.gather(scores, order)
return proposals, scores
评论列表
文章目录