Skip to content

Commit 5d328c5

Browse files
mbaretkevinthesun
authored andcommitted
[TOPI] Fixed nms max_output_size loop (apache#4541)
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
1 parent 8ba9e8b commit 5d328c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

topi/python/topi/vision/nms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def hybrid_nms(data, sorted_index, valid_count,
278278
# Only return max_output_size valid boxes
279279
num_valid_boxes = 0
280280
if max_output_size > 0:
281-
for j in parallel(valid_count[i]):
281+
for j in range(valid_count[i]):
282282
if output[i, j, 0] >= zero:
283283
if num_valid_boxes == max_output_size:
284284
for k in range(box_data_length):

0 commit comments

Comments
 (0)