diff --git a/keras/src/trainers/trainer.py b/keras/src/trainers/trainer.py index ff103b535c36..267923f333d5 100644 --- a/keras/src/trainers/trainer.py +++ b/keras/src/trainers/trainer.py @@ -140,7 +140,6 @@ def compile( wrapped in a `LossScaleOptimizer`, which will dynamically scale the loss to prevent underflow. """ - self._clear_previous_trainer_metrics() optimizer = optimizers.get(optimizer) self.optimizer = optimizer if (