Skip to content

Commit

Permalink
Remove inf from stored stats (#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
danpovey authored Jun 10, 2024
1 parent 130a18c commit 4d5c1f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion icefall/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,8 @@ def __add__(self, other: "MetricsTracker") -> "MetricsTracker":
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":
Expand Down

0 comments on commit 4d5c1f2

Please sign in to comment.