This is an automated email from the ASF dual-hosted git repository.
haoj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 35916f1 relax alto rtol for ftrl test when dtype is fp16 (#18226)
35916f1 is described below
commit 35916f10cd5c768de79c4647662fa1dbc5542c19
Author: Shuai Zheng <[email protected]>
AuthorDate: Tue May 5 20:40:36 2020 -0700
relax alto rtol for ftrl test when dtype is fp16 (#18226)
Co-authored-by: Ubuntu <[email protected]>
---
tests/python/unittest/test_optimizer.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/python/unittest/test_optimizer.py
b/tests/python/unittest/test_optimizer.py
index a8cb69c..2f7f4de 100644
--- a/tests/python/unittest/test_optimizer.py
+++ b/tests/python/unittest/test_optimizer.py
@@ -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()