Fix eigs call

This commit is contained in:
Daniel Povey 2022-10-05 16:22:33 +08:00
parent 1cd7e93183
commit 040592a9e3

View File

@ -211,7 +211,7 @@ class TensorDiagnostic(object):
print(
"Error getting eigenvalues, trying another method."
)
eigs = torch.linalg.eigvals(stats)
eigs, _ = torch.eig(stats)
stats = eigs.abs().sqrt()
# sqrt so it reflects data magnitude, like stddev- not variance