MCPcopy Create free account
hub / github.com/pytorch/tutorials / MatrixExponential

Class MatrixExponential

intermediate_source/parametrizations.py:243–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241# But the matrix exponential also maps the skew-symmetric matrices to the orthogonal matrices.
242# Using these two facts, we may reuse the parametrizations before to our advantage
243class MatrixExponential(nn.Module):
244 def forward(self, X):
245 return torch.matrix_exp(X)
246
247layer_orthogonal = nn.Linear(3, 3)
248parametrize.register_parametrization(layer_orthogonal, "weight", Skew())

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected