From 12352f194961e74ce501b9efb7ff31d08e5842c7 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Sun, 5 May 2019 12:15:04 -0400 Subject: [PATCH] fixed epoch continuation from checkpoint --- pytorch_lightning/root_module/model_saving.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytorch_lightning/root_module/model_saving.py b/pytorch_lightning/root_module/model_saving.py index 0e588eddb6..4455b945c5 100644 --- a/pytorch_lightning/root_module/model_saving.py +++ b/pytorch_lightning/root_module/model_saving.py @@ -88,6 +88,7 @@ class TrainerIO(object): self.early_stop_callback.wait = checkpoint['early_stop_callback_wait'] self.early_stop_callback.patience = checkpoint['early_stop_callback_patience'] self.global_step = checkpoint['global_step'] + self.current_epoch = checkpoint['epoch'] # restore the optimizers optimizer_states = checkpoint['optimizer_states']