Skip to content

Commit e73d9c3

Browse files
committed
fix: reset
1 parent aa2ca00 commit e73d9c3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pytorch_optimizer/shampoo.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ def reset(self):
7171

7272
state['step'] = 0
7373

74-
# pre-condition matrices
75-
for dim_id, dim in enumerate(p.grad.size()):
76-
state[f'pre_cond_{dim_id}'] = group['eps'] * torch.eye(dim, out=p.grad.new(dim, dim))
77-
state[f'inv_pre_cond_{dim_id}'] = p.grad.new(dim, dim).zero_()
78-
7974
@torch.no_grad()
8075
def step(self, closure: CLOSURE = None) -> LOSS:
8176
loss: LOSS = None

0 commit comments

Comments
 (0)