Skip to content

Commit f2d6f14

Browse files
committed
fix: typo
1 parent 863806a commit f2d6f14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytorch_optimizer/optimizer/galore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def project(self, full_rank_grad: torch.Tensor, steps: int) -> torch.Tensor:
105105
if self.projection_type == 'right':
106106
return self.get_low_rank_grad_right(full_rank_grad, steps)
107107
if self.projection_type == 'left':
108-
return self.get_low_rank_grad_right(full_rank_grad, steps)
108+
return self.get_low_rank_grad_left(full_rank_grad, steps)
109109
if self.projection_type == 'full':
110110
return self.get_low_rank_grad_full(full_rank_grad, steps)
111111
raise NotImplementedError
@@ -126,7 +126,7 @@ def project_back(self, low_rank_grad: torch.Tensor) -> torch.Tensor:
126126
if self.projection_type == 'right':
127127
return torch.matmul(low_rank_grad, self.ortho_matrix.t()) * self.scale
128128
if self.projection_type == 'left':
129-
return torch.matmul(self.ortho_matrix, low_rank_grad.t()) * self.scale
129+
return torch.matmul(self.ortho_matrix, low_rank_grad) * self.scale
130130
if self.projection_type == 'full':
131131
return torch.matmul(self.ortho_matrix[0], low_rank_grad) @ self.ortho_matrix[1].t() * self.scale
132132

0 commit comments

Comments
 (0)