Skip to content

Commit

Permalink
set foreach false in nadamw
Browse files Browse the repository at this point in the history
  • Loading branch information
priyakasimbeg committed Sep 22, 2023
1 parent 29efbdd commit 77c1d60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions baselines/nadamw/pytorch/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def __init__(self,
betas=(0.9, 0.999),
eps=1e-8,
weight_decay=1e-2,
fused=False,):
fused=False,
foreach=False,
):
if not 0.0 <= lr:
raise ValueError(f'Invalid learning rate: {lr}')
if not 0.0 <= eps:
Expand All @@ -61,7 +63,7 @@ def __init__(self,
raise ValueError(f'Invalid weight_decay value: {weight_decay}')
defaults = {
'lr': lr, 'betas': betas, 'eps': eps, 'weight_decay': weight_decay,
'fused': fused,
'fused': fused, 'foreach': foreach,
}
super().__init__(params, defaults)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def __init__(self,
betas=(0.9, 0.999),
eps=1e-8,
weight_decay=1e-2,
fused=False):
fused=False,
foreach=False,
):
if not 0.0 <= lr:
raise ValueError(f'Invalid learning rate: {lr}')
if not 0.0 <= eps:
Expand All @@ -58,7 +60,7 @@ def __init__(self,
raise ValueError(f'Invalid weight_decay value: {weight_decay}')
defaults = {
'lr': lr, 'betas': betas, 'eps': eps, 'weight_decay': weight_decay,
'fused': fused,
'fused': fused, 'foreach': foreach,
}
super().__init__(params, defaults)

Expand Down

0 comments on commit 77c1d60

Please sign in to comment.