From 7fbddaa64a086d1cd9bf3a9811b2b153918ed84a Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Wed, 6 Jun 2018 20:41:21 +0800 Subject: [PATCH] bug fix --- python/paddle/fluid/trainer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/trainer.py b/python/paddle/fluid/trainer.py index 444162664da..5230ded7db1 100644 --- a/python/paddle/fluid/trainer.py +++ b/python/paddle/fluid/trainer.py @@ -365,7 +365,8 @@ class Trainer(object): event_handler(BeginEpochEvent(epoch_id)) for step_id, data in enumerate(reader()): if self.__stop: - self._clean_checkpoint() + if self.checkpoint_cfg: + self._clean_checkpoint() return if self.checkpoint_cfg and self.checkpoint_cfg.load_serial \ -- GitLab