From 59554966a651b115476e59e365248ce22a108dfb Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 9 Oct 2021 16:46:18 +0800 Subject: [PATCH] [Frontend][PaddlePaddle] Fix bug for paddle frontend (#9236) * add part of operators * remove part of operators * add lookup * add test * Update paddlepaddle.py * modify error message for SAME padding * Remove some function and old version operator * Remove some function and old version operator * Remove some function and old version operator * Remove some function and old version operator * add dot test * modify doc * remove unreviewed code * Update paddlepaddle.py * Update test_forward.py * Update paddlepaddle.py * Update paddlepaddle.py * Update test_forward.py * Update test_forward.py * add more cases for tests * add more cases for tests * remove annotation * reduce test case sizes * fix bug for paddlepaddle frontend --- python/tvm/relay/frontend/paddlepaddle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/tvm/relay/frontend/paddlepaddle.py b/python/tvm/relay/frontend/paddlepaddle.py index 755c9f70f4ab2..378002a74416c 100644 --- a/python/tvm/relay/frontend/paddlepaddle.py +++ b/python/tvm/relay/frontend/paddlepaddle.py @@ -389,8 +389,9 @@ def convert_feed(g, op, block): if block is not None: ipt_name = op.output("Out")[0] - dtype = op.attr("dtype") - dtype = _convert_dtype_value(dtype) + ipt_shape = block.var(ipt_name).shape + ipt_dtype = block.var(ipt_name).dtype + ipt_dtype = str(ipt_dtype).strip().split(".")[1] else: ipt_shape = op.shape ipt_dtype = str(op.dtype).strip().split(".")[1]