Skip to content

Commit 6251fb2

Browse files
committed
update: remove step from group
1 parent f7d40c1 commit 6251fb2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

pytorch_optimizer/optimizer/lion.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def reset(self):
5353
for p in group['params']:
5454
state = self.state[p]
5555

56-
state['step'] = 0
5756
state['exp_avg'] = torch.zeros_like(p)
5857

5958
@torch.no_grad()
@@ -77,10 +76,8 @@ def step(self, closure: CLOSURE = None) -> LOSS:
7776
state = self.state[p]
7877

7978
if len(state) == 0:
80-
state['step'] = 0
8179
state['exp_avg'] = torch.zeros_like(p)
8280

83-
state['step'] += 1
8481
update = exp_avg = state['exp_avg']
8582

8683
if weight_decay > 0.0:

0 commit comments

Comments
 (0)