This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 7ffb252 re-enabling randomized test_l2_normalization (#11900)
7ffb252 is described below
commit 7ffb2528c80b58005c9dc3b5ae4d273bebadfb71
Author: Hao Jin <[email protected]>
AuthorDate: Mon Jul 30 23:49:35 2018 -0400
re-enabling randomized test_l2_normalization (#11900)
---
tests/python/unittest/test_operator.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/tests/python/unittest/test_operator.py
b/tests/python/unittest/test_operator.py
index fa5de0c..99d635e 100644
--- a/tests/python/unittest/test_operator.py
+++ b/tests/python/unittest/test_operator.py
@@ -3018,17 +3018,18 @@ def check_l2_normalization(in_shape, mode, dtype,
norm_eps=1e-10):
check_numeric_gradient(out, [in_data], numeric_eps=1e-3, rtol=1e-2,
atol=1e-3)
-# TODO(szha): Seeding this masks failures. We need to do a deep dive for
failures without this seed.
-@with_seed(1234)
+# @haojin2: getting rid of the fixed seed as the flakiness could not be
reproduced.
+# tracked at: https://github.com/apache/incubator-mxnet/issues/11717
+@with_seed()
def test_l2_normalization():
for dtype in ['float16', 'float32', 'float64']:
for mode in ['channel', 'spatial', 'instance']:
- for nbatch in [1, 4]:
- for nchannel in [3, 5]:
- for height in [4, 6]:
- check_l2_normalization((nbatch, nchannel, height),
mode, dtype)
- for width in [5, 7]:
- check_l2_normalization((nbatch, nchannel, height,
width), mode, dtype)
+ nbatch = random.randint(1, 4)
+ nchannel = random.randint(3, 5)
+ height = random.randint(4, 6)
+ check_l2_normalization((nbatch, nchannel, height), mode, dtype)
+ width = random.randint(5, 7)
+ check_l2_normalization((nbatch, nchannel, height, width), mode,
dtype)
def check_layer_normalization(in_shape, axis, eps, dtype=np.float32,
forward_check_eps=1E-3):