This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/master by this push:
new f221844 Fixed extra reshape parameter bug. (#4524)
f221844 is described below
commit f221844bd9783b1f9959ef1b93f4349783bf4ccd
Author: Josh Fromm <[email protected]>
AuthorDate: Sun Dec 15 15:08:35 2019 -0800
Fixed extra reshape parameter bug. (#4524)
---
python/tvm/relay/frontend/onnx.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/python/tvm/relay/frontend/onnx.py
b/python/tvm/relay/frontend/onnx.py
index 3d90d15..e4e1e9e 100644
--- a/python/tvm/relay/frontend/onnx.py
+++ b/python/tvm/relay/frontend/onnx.py
@@ -463,7 +463,8 @@ class Reshape(OnnxOpConverter):
@classmethod
def _impl_v5(cls, inputs, attr, params):
if get_name(inputs[1]) in params:
- shape = tuple(params[inputs[1].name_hint].asnumpy())
+ # pop shape out of parameters since it wont be needed later.
+ shape = tuple(params.pop(inputs[1].name_hint).asnumpy())
out = _op.reshape(inputs[0], shape)
else:
data, shape = inputs