diff --git a/returnn/tf/engine.py b/returnn/tf/engine.py index 5b11163a81..4f45998c8a 100644 --- a/returnn/tf/engine.py +++ b/returnn/tf/engine.py @@ -1701,7 +1701,7 @@ def _maybe_use_better_last_model(self): opts = self.config.get_of_type("use_last_best_model", dict, default={}).copy() if self.epoch % opts.pop("modulo", 1) != 0: # Normally we would filter those out. One maybe sensible exception is if the last score was really bad. - if (self.learning_rate_control.get_epoch_error_value(self.epoch - 1, must_exist=False) or 0) <= opts.get( + if (self.learning_rate_control.get_epoch_error_value(self.epoch - 1) or 0) <= opts.get( "filter_score", float("inf") ): return