This is an automated email from the ASF dual-hosted git repository. srk 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 2e1ef8e Don't add cast for TF batch norm when type isn't changing (#5731) 2e1ef8e is described below commit 2e1ef8e4b7e39bcd0ce68192c38800e2364e0984 Author: Trevor Morris <trevm...@amazon.com> AuthorDate: Mon Jun 8 16:43:28 2020 -0700 Don't add cast for TF batch norm when type isn't changing (#5731) --- python/tvm/relay/frontend/tensorflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/relay/frontend/tensorflow.py b/python/tvm/relay/frontend/tensorflow.py index 201c6ba..50987f9 100644 --- a/python/tvm/relay/frontend/tensorflow.py +++ b/python/tvm/relay/frontend/tensorflow.py @@ -1227,7 +1227,7 @@ def _fused_batch_norm(): attr['data_format'] = attr['data_format'].decode("utf-8") if attr['data_format'] == 'NCHW': axis = 1 - if 'U' in attr: + if 'U' in attr and attr['U'].name != attr['T'].name: need_cast = True inputs[0] = _op.cast(inputs[0], dtype=attr['U'].name) # Check if mean and variance are empty