Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix qadam NAN problem #654

Merged
merged 4 commits into from
Feb 4, 2023
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
Prev Previous commit
Next Next commit
remove weight decay temporarily
  • Loading branch information
wangraying committed Dec 6, 2022
commit fd444623a8cb40b4f99a228560f5780a6b6f92e5
4 changes: 2 additions & 2 deletions tests/torch_api/test_qadam.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def run_step(opt_cls, opt_flags, seed):
class TestQAdam(unittest.TestCase):
@skip_if_cuda_available()
def test_qadam_optimizer(self):
loss1 = run_step(torch.optim.Adam, {"lr": 0.001, "weight_decay": 0.1}, seed=13)
loss1 = run_step(torch.optim.Adam, {"lr": 0.001}, seed=13)
loss2 = run_step(
QAdamOptimizer,
{"lr": 0.001, "weight_decay": 0.1, "warmup_steps": 2000},
{"lr": 0.001, "warmup_steps": 2000},
seed=13,
)
self.assertEqual(loss1.item(), loss2.item())