SRN-Deblur icon indicating copy to clipboard operation
SRN-Deblur copied to clipboard

re-train using previous checkpoint

Open pygabc1 opened this issue 4 years ago • 0 comments

In order to re-train using previous checkpoint, I try to change the following code in "model.py": `self.saver = tf.train.Saver(max_to_keep=50, keep_checkpoint_every_n_hours=1) coord = tf.train.Coordinator() threads = tf.train.start_queue_runners(sess=sess, coord=coord)

summary_op = tf.summary.merge_all() summary_writer = tf.summary.FileWriter(self.train_dir, sess.graph, flush_secs=30)`

to: `# training summary summary_op = tf.summary.merge_all() summary_writer = tf.summary.FileWriter(self.train_dir, sess.graph, flush_secs=30)

saver = tf.train.import_meta_graph(r'./checkpoints/color/deblur.model-523000.meta') saver.restore(sess, tf.train.latest_checkpoint(r'./checkpoints/color/')) self.saver = saver

coord = tf.train.Coordinator() threads = tf.train.start_queue_runners(sess=sess, coord=coord)`

However, I have an error of ValueError: Can't load save_path when it is None in the line of saver.restore(sess, [tf.train.latest_checkpoint(r'./checkpoints/color/'))]

pygabc1 avatar Mar 31 '20 07:03 pygabc1