I tried to save my model and then tried to restore it, but it seems that tenorflow cannot find the location of the corresponding files: -
Code to save model output: -
import tensorflow as tf
save_file = 'model.ckpt'
weights = tf.Variable(tf.truncated_normal([2, 3]))
bias = tf.Variable(tf.truncated_normal([3]))
saver = tf.train.Saver()
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
saver.save(sess, save_file)
Model Recovery Code
import tensorflow as tf
save_file = 'model.ckpt'
tf.reset_default_graph()
weights = tf.Variable(tf.truncated_normal([2, 3]))
bias = tf.Variable(tf.truncated_normal([3]))
saver = tf.train.Saver()
with tf.Session() as sess:
saver.restore(sess, 'model.ckpt')
I get below errors: -
W tensorflow / core / framework / op_kernel.cc: 975] Not found: Unsuccessful constructor TensorSliceReader: Could not find matching files for model.ckpt
W tensorflow / core / framework / op_kernel.cc: 975] Not found: Unsuccessful constructor TensorSliceReader: Could not find matching files for model.ckpt
source
share