From 848fdde4eb8338bdcb6bbfb82bdb42120d926fba Mon Sep 17 00:00:00 2001 From: TheMGGdev <159442898+TheMGGdev@users.noreply.github.com> Date: Fri, 8 Nov 2024 18:18:35 +0100 Subject: [PATCH] Update trainer.py Cleaning each time you compile the model the previous trainer metrics also erased the compilation of other models with are a cominbation of that model. Given problems in archiquectures shuch as GAN. As explain in issue: --- keras/src/trainers/trainer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/keras/src/trainers/trainer.py b/keras/src/trainers/trainer.py index ff103b535c3..267923f333d 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 (