ilyag-grovety commented on code in PR #15117:
URL: https://github.com/apache/tvm/pull/15117#discussion_r1270346206
##########
python/tvm/relay/op/vision/_vision.py:
##########
@@ -122,6 +125,33 @@ def all_class_nms_shape_func(attrs, inputs, _):
return _all_class_nms_shape_func_tf(inputs[0], inputs[1])
+@script
+def _regular_nms_shape_func(boxes_shape, scores_shape, attrs):
+ out_boxes_shape = output_tensor((3,), "int64")
+ out_classes_shape = output_tensor((2,), "int64")
+ out_scores_shape = output_tensor((2,), "int64")
+ out_num_detections_shape = output_tensor((1,), "int64")
+
+ out_boxes_shape[0] = boxes_shape[0]
+ out_boxes_shape[1] = int64(attrs.max_detections)
+ out_boxes_shape[2] = int64(4)
+
+ out_classes_shape[0] = boxes_shape[0]
+ out_classes_shape[1] = int64(attrs.max_detections)
+
+ out_scores_shape[0] = boxes_shape[0]
+ out_scores_shape[1] = int64(attrs.max_detections)
+
+ out_num_detections_shape[0] = int64(1)
Review Comment:
You're right, fixed
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]