From 79204cb0fe38a306b36f66e4eab69233d9dc9f2f Mon Sep 17 00:00:00 2001 From: yanghuacong Date: Sun, 16 Feb 2020 10:58:42 +0800 Subject: [PATCH] [RELAY][FRONTEND][TF] Fix FuseBatchNorm output cast error if need_cast is True --- python/tvm/relay/frontend/tensorflow.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/tvm/relay/frontend/tensorflow.py b/python/tvm/relay/frontend/tensorflow.py index ac2ea9d0b1bb..d89737b5a4a7 100644 --- a/python/tvm/relay/frontend/tensorflow.py +++ b/python/tvm/relay/frontend/tensorflow.py @@ -897,6 +897,7 @@ def _impl(inputs, attr, params): disables=['momentum'])(inputs, attr) if need_cast: + out = _expr.TupleGetItem(out.astuple(), 0) out = _op.cast(out, dtype=attr['T'].name) return out return _impl