Skip to content

Commit 1e5ec44

Browse files
kit1980lezcano
andauthored
Update removed torch.symeig in parametrizations.py (#2472)
* Update removed torch.symeig from parametrizations.py torch.symeig was removed pytorch/pytorch#70988 --------- Co-authored-by: Mario Lezcano Casado <[email protected]>
1 parent 2bfcade commit 1e5ec44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intermediate_source/parametrizations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def forward(self, X):
255255
parametrize.register_parametrization(layer_spd, "weight", MatrixExponential())
256256
X = layer_spd.weight
257257
print(torch.dist(X, X.T)) # X is symmetric
258-
print((torch.symeig(X).eigenvalues > 0.).all()) # X is positive definite
258+
print((torch.linalg.eigvalsh(X) > 0.).all()) # X is positive definite
259259

260260
###############################################################################
261261
# Initializing parametrizations

0 commit comments

Comments
 (0)