Skip to content

Commit 7c05b6b

Browse files
authored
Merge branch 'main' into 099_gpu_quant
2 parents 1d36490 + e96a8a9 commit 7c05b6b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

intermediate_source/parametrizations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ def forward(self, X):
306306
def right_inverse(self, A):
307307
# Assume A orthogonal
308308
# See https://en.wikipedia.org/wiki/Cayley_transform#Matrix_map
309-
# (X - I)(X + I)^{-1}
310-
return torch.linalg.solve(X + self.Id, self.Id - X)
309+
# (A - I)(A + I)^{-1}
310+
return torch.linalg.solve(A + self.Id, self.Id - A)
311311

312312
layer_orthogonal = nn.Linear(3, 3)
313313
parametrize.register_parametrization(layer_orthogonal, "weight", Skew())

recipes_source/recipes/what_is_state_dict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252

5353
import torch
5454
import torch.nn as nn
55+
import torch.nn.functional as F
5556
import torch.optim as optim
5657

5758

0 commit comments

Comments
 (0)