diff --git a/ppfleetx/core/engine/eager_engine.py b/ppfleetx/core/engine/eager_engine.py index 8ceeacc10..947fada23 100644 --- a/ppfleetx/core/engine/eager_engine.py +++ b/ppfleetx/core/engine/eager_engine.py @@ -288,7 +288,7 @@ def _train_one_epoch(self, self._train_steps += 1 train_losses.append(loss) - if (step + 1) % self._logging_freq == 0 or (step + 1) % self._accumulate_steps == 0: + if (step + 1) % (self._logging_freq * self._accumulate_steps) == 0: # Sync for profile time, delete it may be a little faster paddle.device.cuda.synchronize() train_costs = time.time() - train_start