在我的程序长时间训练并因任何原因停止的情况下,我希望能够从最近的检查点附近开始。我正在使用队列,我没有问题用
恢复大多数变量 with tf.Session() as sess:
merged = s.summarize_variables()
merged = tf.summary.merge_all()
train_writer = tf.summary.FileWriter(save_dir + '/train',sess.graph)
eval_writer = tf.summary.FileWriter(save_dir + '/test')
sess.run(tf.local_variables_initializer())
sess.run(tf.global_variables_initializer())
coord = tf.train.Coordinator()
saver = tf.train.Saver()
tf.train.start_queue_runners(sess, coord=coord)
if model_file:
saver.restore(sess, model_file)
try:
while not coord.should_stop():
tflearn.is_training(True)
cur_step = sess.run(global_step)
当我恢复模型时,我发现队列没有完成。创建检查点时如何将queus恢复到其状态?