Skip to content

Commit

Permalink
init the concat tensor with 1s and then slice them away (#7666)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Brookhart authored Mar 16, 2021
1 parent 7f96986 commit 348d4e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/tvm/relay/frontend/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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([]).reshape([0, 3]).astype("int64"), dtype="int64")
init_out = _op.const(np.array([1, 1, 1]).reshape([1, 3]).astype("int64"), dtype="int64")
loop_vals = outer_loop(init_count, B, C, onnx_output, nms_size_output, init_out)

return _expr.TupleGetItem(loop_vals, 5)
loop_out = _expr.TupleGetItem(loop_vals, 5)
return _op.strided_slice(loop_out, [1, 0], shape_of(loop_out), [1, 1])


# compatible operators that do NOT require any conversion.
Expand Down

0 comments on commit 348d4e7

Please sign in to comment.