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

Commit

Permalink
adjust the success rate
Browse files Browse the repository at this point in the history
  • Loading branch information
stu1130 committed Mar 20, 2019
1 parent c31bb7e commit 243d4d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/python/unittest/test_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,14 +642,14 @@ def quantize_probs(probs, dtype):
generator_mx = lambda x: mx.nd.random.multinomial(data=mx.nd.array(quantized_probs, ctx=ctx, dtype=dtype),
shape=x).asnumpy()
verify_generator(generator=generator_mx, buckets=buckets, probs=quantized_probs,
nsamples=samples, nrepeat=trials)
nsamples=samples, nrepeat=trials, success_rate=0.20)
generator_mx_same_seed = \
lambda x: np.concatenate(
[mx.nd.random.multinomial(data=mx.nd.array(quantized_probs, ctx=ctx, dtype=dtype),
shape=x // 10).asnumpy()
for _ in range(10)])
verify_generator(generator=generator_mx_same_seed, buckets=buckets, probs=quantized_probs,
nsamples=samples, nrepeat=trials)
nsamples=samples, nrepeat=trials, success_rate=0.20)


@with_seed()
Expand Down

0 comments on commit 243d4d2

Please sign in to comment.