mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 10:02:22 +00:00
fix for case of None stats
This commit is contained in:
parent
74c14f5f5d
commit
a35b28cd8d
@ -178,6 +178,9 @@ class TensorDiagnostic(object):
|
||||
|
||||
def print_diagnostics(self):
|
||||
"""Print diagnostics for each dimension of the tensor."""
|
||||
if self.stats is None:
|
||||
print(f"Warning: the stats of {self.name} is None.")
|
||||
return
|
||||
for dim, this_dim_stats in enumerate(self.stats):
|
||||
for stats_type, stats_list in this_dim_stats.items():
|
||||
# stats_type could be "rms", "value", "abs", "eigs", "positive".
|
||||
|
Loading…
x
Reference in New Issue
Block a user