Remove inf from stored stats

This commit is contained in:
Daniel Povey 2024-06-10 22:40:51 +08:00
parent 130a18cc10
commit 29bb04a51c

View File

@ -1159,7 +1159,8 @@ class MetricsTracker(collections.defaultdict):
for k, v in self.items():
ans[k] = v
for k, v in other.items():
ans[k] = ans[k] + v
if v - v == 0:
ans[k] = ans[k] + v
return ans
def __mul__(self, alpha: float) -> "MetricsTracker":