We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CayleyMap
right_inverse
1 parent 114320c commit e96a8a9Copy full SHA for e96a8a9
intermediate_source/parametrizations.py
@@ -306,8 +306,8 @@ def forward(self, X):
306
def right_inverse(self, A):
307
# Assume A orthogonal
308
# 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)
+ # (A - I)(A + I)^{-1}
+ return torch.linalg.solve(A + self.Id, self.Id - A)
311
312
layer_orthogonal = nn.Linear(3, 3)
313
parametrize.register_parametrization(layer_orthogonal, "weight", Skew())
0 commit comments