Skip to content

Commit

Permalink
update: reset
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed May 5, 2024
1 parent 06026db commit ae7dbed
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pytorch_optimizer/optimizer/sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,6 @@ def __str__(self) -> str:
def reset(self):
for group in self.param_groups:
for p in group['params']:
if p.grad is None:
continue

state = self.state[p]

state['s'] = torch.ones_like(p)
Expand Down

0 comments on commit ae7dbed

Please sign in to comment.