I am confused. I don't know what's happening. I cannot restore my checkpoints. The weird thing is sometimes I can restore them then after 1-2 hours I can't.
I use this code to save
saver = tf.train.Saver()
with tf.Session() as sess:
.....
#sess.run(init)
saver.restore(sess, 'models/my_model_2.ckpt')
I use this code to restore
with tf.Session() as sess:
#sess.run(init)
saver.restore(sess, 'models/my_model_2.ckpt')
......
Error
2020-10-15 01:10:35.195112: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at
save_restore_v2_ops.cc:184 : Not found: Key Variable/Adam not found in checkpoint
If you don't know how to fix this, just tell me if there is another way to restore variables. Also, my program is a CNN with neural network at the end. Im using tensor flow for everything.
change your optimizer from Adam to other? i don't know why,but i solve this problem by this way.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.