From: mbarrett97 <55580676+mbarrett97@users.noreply.github.com> Date: Wed, 18 Dec 2019 21:23:36 +0000 (+0000) Subject: [TOPI] Fixed nms max_output_size loop (#4541) X-Git-Tag: upstream/0.7.0~1504 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d328c5c8c588bb0a7b42cebefea5a835f3977fe;p=platform%2Fupstream%2Ftvm.git [TOPI] Fixed nms max_output_size loop (#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 --- diff --git a/topi/python/topi/vision/nms.py b/topi/python/topi/vision/nms.py index 0d20095..5bb36f7 100644 --- a/topi/python/topi/vision/nms.py +++ b/topi/python/topi/vision/nms.py @@ -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):