works now

This commit is contained in:
Alexander Munch-Hansen 2018-03-06 11:53:42 +01:00
parent 09973b6cde
commit 5845edf084

View File

@ -93,6 +93,7 @@ class Network:
self.saver.save(self.session, self.checkpoint_path + 'model.ckpt') self.saver.save(self.session, self.checkpoint_path + 'model.ckpt')
def restore_model(self): def restore_model(self):
if os.path.isfile(self.checkpoint_path):
latest_checkpoint = tf.train.latest_checkpoint(self.checkpoint_path) latest_checkpoint = tf.train.latest_checkpoint(self.checkpoint_path)
self.saver.restore(self.session, latest_checkpoint) self.saver.restore(self.session, latest_checkpoint)