From d1101ffdfb7d41635bd247c80155b29edd8e5d0d Mon Sep 17 00:00:00 2001 From: Bing Liu Date: Mon, 6 Nov 2017 11:30:23 -0800 Subject: [PATCH] corrected modeling restoringwq condition --- run_multi-task_rnn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_multi-task_rnn.py b/run_multi-task_rnn.py index 09d2ff4..af8742a 100644 --- a/run_multi-task_rnn.py +++ b/run_multi-task_rnn.py @@ -216,7 +216,7 @@ def create_model(session, task=task) ckpt = tf.train.get_checkpoint_state(FLAGS.train_dir) - if ckpt and tf.gfile.Exists(ckpt.model_checkpoint_path): + if ckpt: print("Reading model parameters from %s" % ckpt.model_checkpoint_path) model_train.saver.restore(session, ckpt.model_checkpoint_path) else: @@ -444,4 +444,4 @@ def main(_): train() if __name__ == "__main__": - tf.app.run() \ No newline at end of file + tf.app.run()