Skip to content

Commit

Permalink
Update removed torch.symeig in parametrizations.py (pytorch#2472)
Browse files Browse the repository at this point in the history
* Update removed torch.symeig from parametrizations.py
torch.symeig was removed pytorch/pytorch#70988
---------
Co-authored-by: Mario Lezcano Casado <[email protected]>
  • Loading branch information
kit1980 authored Jun 15, 2023
1 parent 2bfcade commit 1e5ec44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion intermediate_source/parametrizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def forward(self, X):
parametrize.register_parametrization(layer_spd, "weight", MatrixExponential())
X = layer_spd.weight
print(torch.dist(X, X.T)) # X is symmetric
print((torch.symeig(X).eigenvalues > 0.).all()) # X is positive definite
print((torch.linalg.eigvalsh(X) > 0.).all()) # X is positive definite

###############################################################################
# Initializing parametrizations
Expand Down

0 comments on commit 1e5ec44

Please sign in to comment.