From 10d4341d10dbd86ec7ab5c10a734427e07d92653 Mon Sep 17 00:00:00 2001 From: Matthew Brookhart Date: Tue, 16 Mar 2021 11:39:11 -0600 Subject: [PATCH] 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 391eaaab5f64..4a0a1ed09b9f 100644 --- a/python/tvm/relay/frontend/onnx.py +++ b/python/tvm/relay/frontend/onnx.py @@ -2629,10 +2629,10 @@ def _outer_body(i, B, C, onnx_out, nms_size_out, out): # 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.