jiangsutx / SRN-Deblur

Repository for Scale-recurrent Network for Deep Image Deblurring
http://www.xtao.website/projects/srndeblur/srndeblur_cvpr18.pdf
MIT License
709 stars 184 forks source link

re-train using previous checkpoint #54

Open pygabc1 opened 4 years ago

pygabc1 commented 4 years ago

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/'))]