kevinthesun commented on a change in pull request #4312:
URL: https://github.com/apache/incubator-tvm/pull/4312#discussion_r411062505



##########
File path: topi/python/topi/vision/nms.py
##########
@@ -139,24 +200,28 @@ def get_valid_counts(data, score_threshold=0, id_index=0, 
score_index=1):
 
     Returns
     -------
+    valid_count : tvm.te.Tensor
+        1-D tensor for valid number of boxes.
+
     out_tensor : tvm.te.Tensor
         Rearranged data tensor.
 
-    valid_count : tvm.te.Tensor
-        1-D tensor for valid number of boxes.
+    out_indices: tvm.te.Tensor or numpy NDArray
+        Related index in input data.
     """
     score_threshold_const = tvm.tir.const(score_threshold, data.dtype)
     id_index_const = tvm.tir.const(id_index, "int32")
     score_index_const = tvm.tir.const(score_index, "int32")
     return hybrid_get_valid_counts(data, score_threshold_const,
                                    id_index_const, score_index_const,
-                                   tvm.tir.const(1, data.dtype))
+                                   tvm.tir.const(1, data.dtype),
+                                   data.shape[0])
 
 
 @hybrid.script
-def hybrid_nms(data, sorted_index, valid_count,
-               max_output_size, iou_threshold, force_suppress,
-               top_k, coord_start, id_index, score_index, zero, one):
+def hybrid_nms(data, sorted_index, valid_count, indices, batch_size, 
max_output_size,

Review comment:
       Same.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to