From d5fd16a478148f6ec46ca73fc4f062f3563a14b9 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 7 Aug 2019 07:38:45 -0400 Subject: [PATCH] removed bad hook call --- pytorch_lightning/models/trainer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 4d72618b..7aa1c037 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -244,9 +244,6 @@ class Trainer(TrainerIO): ''' raise ModuleNotFoundError(msg) - # restore training and model - self.restore_state_if_existing_checkpoint() - def restore_state_if_existing_checkpoint(self): # restore trainer state and model if there is a weight for this experiment last_epoch = -1 @@ -624,6 +621,9 @@ class Trainer(TrainerIO): ref_model.trainer = self ref_model.experiment = self.experiment + # restore training and model + self.restore_state_if_existing_checkpoint() + # run tiny validation to make sure program won't crash during val _ = self.validate(model, self.val_dataloader, max_batches=self.nb_sanity_val_steps)