Skip to content

Commit

Permalink
Remove inf from stored stats (k2-fsa#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
danpovey authored and Your Name committed Aug 9, 2024
1 parent 8d68b50 commit 50769ff
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 50769ff

Please sign in to comment.