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

Fixes the test_sgld #14473

Merged
merged 2 commits into from
Mar 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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