Skip to content

Commit fbe9777

Browse files
committed
first step works with store_triu_as_line
1 parent ad178b8 commit fbe9777

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

heavyball/chainable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,10 @@ def _init_psgd_eigen_kron(state, group, update, grad, param, prob: Optional[call
920920
state["running_lower_bound"] = [torch.zeros((1,), device=q.device, dtype=torch.float64) for q in Q]
921921
state["step"] = torch.zeros((), device=param.device, dtype=torch.float64)
922922

923+
line, group["store_triu_as_line"] = group["store_triu_as_line"], False
923924
_update_psgd_precond(False, None, group, param, update, Q, state["running_lower_bound"], state["step"], prob)
924-
state["Q"] = utils.triu_to_line(Q) if group["store_triu_as_line"] else Q
925+
group["store_triu_as_line"] = line
926+
state["Q"] = utils.triu_to_line(Q) if line else Q
925927
state["Q_basis"] = utils.init_psgd_eigenbasis(Q)
926928

927929

0 commit comments

Comments
 (0)