From a582f10501efded99b936b70dc826573f1daff3f Mon Sep 17 00:00:00 2001 From: FDInSky <48318485+FDInSky@users.noreply.github.com> Date: Mon, 30 Mar 2020 21:51:15 +0800 Subject: [PATCH] test=develop fix generate_proposal_labels unit test (#23154) --- .../fluid/tests/unittests/test_generate_proposal_labels_op.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/fluid/tests/unittests/test_generate_proposal_labels_op.py b/python/paddle/fluid/tests/unittests/test_generate_proposal_labels_op.py index 1259c82b58..a5d36203b0 100644 --- a/python/paddle/fluid/tests/unittests/test_generate_proposal_labels_op.py +++ b/python/paddle/fluid/tests/unittests/test_generate_proposal_labels_op.py @@ -94,6 +94,7 @@ def _sample_rois(rpn_rois, gt_classes, is_crowd, gt_boxes, im_info, hs = boxes[:, 3] - boxes[:, 1] + 1 keep = np.where((ws > 0) & (hs > 0))[0] boxes = boxes[keep] + max_overlaps = max_overlaps[keep] fg_inds = np.where(max_overlaps >= fg_thresh)[0] bg_inds = np.where((max_overlaps < bg_thresh_hi) & (max_overlaps >= bg_thresh_lo))[0] -- GitLab