Skip to content

Commit

Permalink
relax alto rtol for ftrl test when dtype is fp16 (apache#18226)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
szhengac and Ubuntu authored May 6, 2020
1 parent c329a52 commit 35916f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/python/unittest/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,10 @@ def test_ftrl():
if (dtype == np.float16 and
('multi_precision' not in kwarg or not kwarg['multi_precision'])):
continue
rtol, atol = (1e-3, 1e-3) if dtype is np.float16 else (1e-4, 1e-4)
compare_optimizer(opt1(use_fused_step=False, **kwarg),
opt2(use_fused_step=True, **kwarg), shapes, dtype,
rtol=1e-4, atol=1e-4)
rtol=rtol, atol=atol)


@with_seed()
Expand Down

0 comments on commit 35916f1

Please sign in to comment.