From d372a5e80377da0e12ec14d37512f5a7ce653862 Mon Sep 17 00:00:00 2001 From: Josh Fromm Date: Sun, 15 Dec 2019 11:58:29 -0800 Subject: [PATCH] Fixed extra reshape parameter bug. --- 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 3d90d15e1916..e4e1e9e2616a 100644 --- a/python/tvm/relay/frontend/onnx.py +++ b/python/tvm/relay/frontend/onnx.py @@ -463,7 +463,8 @@ def _impl_v1(cls, inputs, attr, params): @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