projects
/
platform
/
upstream
/
tvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ae439c
)
Don't add cast for TF batch norm when type isn't changing (#5731)
author
Trevor Morris
<trevmorr@amazon.com>
Mon, 8 Jun 2020 23:43:28 +0000
(16:43 -0700)
committer
GitHub
<noreply@github.com>
Mon, 8 Jun 2020 23:43:28 +0000
(
05:13
+0530)
python/tvm/relay/frontend/tensorflow.py
patch
|
blob
|
history
diff --git
a/python/tvm/relay/frontend/tensorflow.py
b/python/tvm/relay/frontend/tensorflow.py
index
201c6ba
..
50987f9
100644
(file)
--- 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