From aeb5f130bc96bc260f20898f40e14a739a183576 Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Mon, 11 Nov 2019 09:24:52 -0800 Subject: [PATCH] [TF][TEST] add test_forward_reduce_any back (#4301) the test case was removed in #4181 for some reason @tqchen @soiferj @zhiics --- tests/python/frontend/tensorflow/test_forward.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/python/frontend/tensorflow/test_forward.py b/tests/python/frontend/tensorflow/test_forward.py index ce1d326..b8c980b 100644 --- a/tests/python/frontend/tensorflow/test_forward.py +++ b/tests/python/frontend/tensorflow/test_forward.py @@ -2444,8 +2444,7 @@ def test_forward_size(): ####################################################################### # All, Any, Max, Min -# ------------- - +# ------------------ def test_forward_reduce_all(): """Test the All operator.""" @@ -2455,7 +2454,14 @@ def test_forward_reduce_all(): tf.reduce_all(in_data, name="all") compare_tf_with_tvm([np_data], ['in_data:0'], 'all:0') - +def test_forward_reduce_any(): + """Test the Any operator.""" + np_data = np.random.choice([True, False], size=(5, 7, 11)) + tf.reset_default_graph() + in_data = tf.placeholder(tf.bool, (5, 7, 11), name="in_data") + tf.reduce_any(in_data, name="any") + compare_tf_with_tvm([np_data], ['in_data:0'], 'any:0') + def test_forward_reduce_max(): def check_max(ishape, axis, keepdims, dtype): tf.reset_default_graph() -- 2.7.4