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: