From 04ca1ba3fdd3081cdf48134a5f711774d983a847 Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Tue, 4 Aug 2020 08:25:35 +0000 Subject: [PATCH] nb fix --- tests/python/unittest/test_gluon_probability_v1.py | 4 ++-- tests/python/unittest/test_gluon_probability_v2.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/python/unittest/test_gluon_probability_v1.py b/tests/python/unittest/test_gluon_probability_v1.py index 92721f610495..5dcbb6bfb34f 100644 --- a/tests/python/unittest/test_gluon_probability_v1.py +++ b/tests/python/unittest/test_gluon_probability_v1.py @@ -540,7 +540,7 @@ def hybrid_forward(self, F, n, params, *args): # Test log_prob for shape, hybridize, use_logit in itertools.product(shapes, [True, False], [True, False]): n = np.random.randint(1, 10, size=shape).astype('float32') - prob = np.random.uniform(low=0.1, size=shape) + prob = np.random.uniform(low=0.2, high=0.6, size=shape) sample = np.random.randint(0, 10, size=shape).astype('float32') param = prob if use_logit: @@ -559,7 +559,7 @@ def hybrid_forward(self, F, n, params, *args): for func in ['mean', 'variance']: for use_logit in [True, False]: n = np.random.randint(1, 10, size=shape).astype('float32') - prob = np.random.uniform(low=0.1, size=shape) + prob = np.random.uniform(low=0.2, high=0.6, size=shape) net = TestNegativeBinomial(func, use_logit) param = prob if use_logit: diff --git a/tests/python/unittest/test_gluon_probability_v2.py b/tests/python/unittest/test_gluon_probability_v2.py index 9a36b4fc7056..77e25f7f7c5b 100644 --- a/tests/python/unittest/test_gluon_probability_v2.py +++ b/tests/python/unittest/test_gluon_probability_v2.py @@ -540,7 +540,7 @@ def forward(self, n, params, *args): # Test log_prob for shape, hybridize, use_logit in itertools.product(shapes, [True, False], [True, False]): n = np.random.randint(1, 10, size=shape).astype('float32') - prob = np.random.uniform(low=0.1, size=shape) + prob = np.random.uniform(low=0.2, high=0.6, size=shape) sample = np.random.randint(0, 10, size=shape).astype('float32') param = prob if use_logit: @@ -559,7 +559,7 @@ def forward(self, n, params, *args): for func in ['mean', 'variance']: for use_logit in [True, False]: n = np.random.randint(1, 10, size=shape).astype('float32') - prob = np.random.uniform(low=0.1, size=shape) + prob = np.random.uniform(low=0.2, high=0.6, size=shape) net = TestNegativeBinomial(func, use_logit) param = prob if use_logit: