You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by mb...@apache.org on 2021/03/16 17:39:33 UTC
[tvm] 01/01: Revert "init the concat tensor with 1s and then slice
them away (#7666)"
This is an automated email from the ASF dual-hosted git repository.
mbrookhart pushed a commit to branch revert-7666-onnx_nms_empty_init
in repository https://gitbox.apache.org/repos/asf/tvm.git
commit 10d4341d10dbd86ec7ab5c10a734427e07d92653
Author: Matthew Brookhart <mb...@octoml.ai>
AuthorDate: Tue Mar 16 11:39:11 2021 -0600
Revert "init the concat tensor with 1s and then slice them away (#7666)"
This reverts commit 348d4e7532f7d5ce68d76e7634a5f11b7dc60ab8.
---
python/tvm/relay/frontend/onnx.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/python/tvm/relay/frontend/onnx.py b/python/tvm/relay/frontend/onnx.py
index 391eaaa..4a0a1ed 100644
--- a/python/tvm/relay/frontend/onnx.py
+++ b/python/tvm/relay/frontend/onnx.py
@@ -2629,10 +2629,10 @@ class NonMaxSuppression(OnnxOpConverter):
# Call the second loop, rework outputs into correct form
init_count = _op.const(np.array([0]).astype("int64"), dtype="int64")
- init_out = _op.const(np.array([1, 1, 1]).reshape([1, 3]).astype("int64"), dtype="int64")
+ init_out = _op.const(np.array([]).reshape([0, 3]).astype("int64"), dtype="int64")
loop_vals = outer_loop(init_count, B, C, onnx_output, nms_size_output, init_out)
- loop_out = _expr.TupleGetItem(loop_vals, 5)
- return _op.strided_slice(loop_out, [1, 0], shape_of(loop_out), [1, 1])
+
+ return _expr.TupleGetItem(loop_vals, 5)
# compatible operators that do NOT require any conversion.