Skip to content

Commit

Permalink
[TOPI] Fixed nms max_output_size loop (#4541)
Browse files Browse the repository at this point in the history
One of the loops in hybrid_nms used for
performing the max_output_size reordering
was incorrectly designated as parallel
resulting in incorrect behaviour. This patch
changes that loop to a serial loop.

Change-Id: I97184f5887f5f028d8ab339fa2808eb7630a4017
  • Loading branch information
mbaret authored and kevinthesun committed Dec 18, 2019
1 parent 8ba9e8b commit 5d328c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion topi/python/topi/vision/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def hybrid_nms(data, sorted_index, valid_count,
# Only return max_output_size valid boxes
num_valid_boxes = 0
if max_output_size > 0:
for j in parallel(valid_count[i]):
for j in range(valid_count[i]):
if output[i, j, 0] >= zero:
if num_valid_boxes == max_output_size:
for k in range(box_data_length):
Expand Down

0 comments on commit 5d328c5

Please sign in to comment.