Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
nb fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xidulu committed Aug 4, 2020
1 parent a77f774 commit 04ca1ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/python/unittest/test_gluon_probability_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/python/unittest/test_gluon_probability_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 04ca1ba

Please sign in to comment.