From e016461f7f7ed2eaaebc7912f71921c1a81085dd Mon Sep 17 00:00:00 2001 From: Leandro Nunes Date: Tue, 27 Oct 2020 15:46:21 +0000 Subject: [PATCH] Revert "[Relay][Frontend] Tensorflow version support upgrade from 2.1.0 to 2.3.1 (#6706)" This reverts commit d50bb0344a45cf99a180ab51134893618aecbd92. --- docker/install/ubuntu_install_tensorflow.sh | 2 +- python/tvm/relay/frontend/tensorflow.py | 4 ++-- tests/python/frontend/tensorflow/test_forward.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/install/ubuntu_install_tensorflow.sh b/docker/install/ubuntu_install_tensorflow.sh index 4e766d4d5a5b..25543909d78b 100755 --- a/docker/install/ubuntu_install_tensorflow.sh +++ b/docker/install/ubuntu_install_tensorflow.sh @@ -20,4 +20,4 @@ set -e set -u set -o pipefail -pip3 install tensorflow==2.3.1 keras==2.3.1 h5py +pip3 install tensorflow==2.1.0 keras==2.3.1 h5py diff --git a/python/tvm/relay/frontend/tensorflow.py b/python/tvm/relay/frontend/tensorflow.py index 89b36256152e..9671e45a59a3 100644 --- a/python/tvm/relay/frontend/tensorflow.py +++ b/python/tvm/relay/frontend/tensorflow.py @@ -1334,7 +1334,7 @@ def _impl(inputs, attr, params, mod): op_name="batch_norm", transforms={"scale_after_normalization": "scale", "variance_epsilon": "epsilon"}, extras={"axis": axis}, - ignores=["data_format", "U", "exponential_avg_factor"], + ignores=["data_format", "U"], disables=["momentum"], )(inputs, attr) @@ -1364,7 +1364,7 @@ def _impl(inputs, attr, params, mod): op_name="batch_norm", transforms={"scale_after_normalization": "scale", "variance_epsilon": "epsilon"}, extras={"axis": axis}, - ignores=["data_format", "exponential_avg_factor"], + ignores=["data_format"], disables=["momentum"], )(new_inputs, attr) diff --git a/tests/python/frontend/tensorflow/test_forward.py b/tests/python/frontend/tensorflow/test_forward.py index 0bcac7fb1a21..8e347e754b98 100644 --- a/tests/python/frontend/tensorflow/test_forward.py +++ b/tests/python/frontend/tensorflow/test_forward.py @@ -3644,7 +3644,7 @@ def _test_math_op(op, dtypes=["int32", "float32"]): _test_math_op(tf.math.reduce_max) _test_math_op(tf.math.reduce_min) _test_math_op(tf.math.reduce_prod) - _test_math_op(tf.math.reduce_variance, dtypes=["float32"]) + _test_math_op(tf.math.reduce_variance) _test_math_op(tf.math.reduce_std, dtypes=["float32"]) _test_math_op(tf.math.reduce_logsumexp, dtypes=["float32"]) if package_version.parse(tf.VERSION) >= package_version.parse("1.15.0"): @@ -3855,11 +3855,11 @@ def test_forward_unravel_index(): _test_forward_unravel_index([x, y]) x = np.array([0, 1, 2, 5]) - y = np.array([2, 3]) + y = np.array([2, 2]) _test_forward_unravel_index([x, y]) x = np.array([0, 1, 2, 5]) - y = np.array([6]) + y = np.array([2]) _test_forward_unravel_index([x, y]) x = np.array([102, 300, 16])