From 2e6610af5ecde60488c157e6eb38db9157956d94 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Thu, 22 Dec 2022 23:00:44 +0800 Subject: [PATCH] Fix diagnostics.py re backoff for eigs --- icefall/diagnostics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icefall/diagnostics.py b/icefall/diagnostics.py index 96c085541..15ec28b3b 100644 --- a/icefall/diagnostics.py +++ b/icefall/diagnostics.py @@ -254,7 +254,7 @@ class TensorDiagnostic(object): "Error getting eigenvalues, trying another method." ) eigs, _ = torch.eig(stats) - stats = eigs.abs().sqrt() + stats = eigs.norm(dim=1).sqrt() # sqrt so it reflects data magnitude, like stddev- not variance if stats_type in [ "rms", "stddev" ]: