mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-08 09:32:20 +00:00
Remove inf from stored stats (#1647)
This commit is contained in:
parent
130a18cc10
commit
4d5c1f2e60
@ -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":
|
||||
|
Loading…
x
Reference in New Issue
Block a user