diff --git a/icefall/utils.py b/icefall/utils.py index 0c509fc174..1dbb954ded 100644 --- a/icefall/utils.py +++ b/icefall/utils.py @@ -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":