guan404ming commented on code in PR #19843:
URL: https://github.com/apache/tvm/pull/19843#discussion_r3443639004


##########
python/tvm/relax/frontend/onnx/onnx_frontend.py:
##########
@@ -4927,12 +4927,12 @@ def _impl_v10(cls, bb, inputs, attr, params):
             max_output_boxes_per_class = 0  # Default value
 
         if iou_threshold is not None and isinstance(iou_threshold, 
relax.Constant):
-            iou_threshold = float(iou_threshold.data.numpy())
+            iou_threshold = float(iou_threshold.data.numpy().item())
         else:
             iou_threshold = 0.5  # Default value

Review Comment:
   fixed. Added the relax.Var path for iou_threshold to match the other params.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to