Skip to content

Commit 3df9ca3

Browse files
committed
[ROCm] Fix for test_nadam
- Cherry pick of dbd701b
1 parent 83364f0 commit 3df9ca3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/optim/test_optim.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,8 @@ def test_adadelta_complex(self):
13061306
)
13071307

13081308
def test_nadam(self):
1309+
if TEST_WITH_ROCM:
1310+
self.rel_tol = 1e-5
13091311
self._test_basic_cases(
13101312
lambda weight, bias, foreach: optim.NAdam(
13111313
self._build_params_dict(weight, bias, lr=1e-2), lr=1e-3, foreach=foreach

0 commit comments

Comments
 (0)