From 554d3a71d207b780d430d94bcaaa27142c7296df Mon Sep 17 00:00:00 2001 From: Jiancheng Li Date: Mon, 29 Apr 2019 14:10:57 +0800 Subject: [PATCH] test=develop fix bug: fix selected_indices in nms (#17140) --- python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py b/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py index 69e060341e..54e055815e 100644 --- a/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py +++ b/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py @@ -81,6 +81,7 @@ def nms(boxes, sorted_indices = np.argsort(-all_scores, axis=0, kind='mergesort') sorted_scores = all_scores[sorted_indices] + sorted_indices = selected_indices[sorted_indices] if top_k > -1 and top_k < sorted_indices.shape[0]: sorted_indices = sorted_indices[:top_k] sorted_scores = sorted_scores[:top_k] -- GitLab