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

Commit

Permalink
Fixes the test_sgld (#14473)
Browse files Browse the repository at this point in the history
* fix the test_sgld

* retrigger CI
  • Loading branch information
stu1130 authored and nswamy committed Apr 5, 2019
1 parent adc0ce7 commit 73fe286
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/python/unittest/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ def update(self, index, weight, grad, state):


@with_seed()
@unittest.skip("test fails intermittently. temporarily disabled till it gets fixed. tracked at https://github.com/apache/incubator-mxnet/issues/14241")
def test_sgld():
opt1 = PySGLD
opt2 = mx.optimizer.SGLD
Expand Down Expand Up @@ -518,7 +517,9 @@ def compare_optimizer_noise_seeded(opt1, opt2, shape, dtype, noise_seed,
if (dtype == np.float16 and ('multi_precision' not in kwarg or
not kwarg['multi_precision'])):
continue
compare_optimizer_noise_seeded(opt1(**kwarg), opt2(**kwarg), shape, dtype, seed)
atol = 1e-2 if dtype == np.float16 else 1e-3
rtol = 1e-4 if dtype == np.float16 else 1e-5
compare_optimizer_noise_seeded(opt1(**kwarg), opt2(**kwarg), shape, dtype, seed, atol=atol, rtol=rtol)



Expand Down

0 comments on commit 73fe286

Please sign in to comment.