最近在练习使用TensorFlow框架进行模型的训练和恢复,在进行模型恢复的过程中遇到了问题:
原代码:
meta_path = 'data_batch.txt_epoch_2.ckpt.meta' #图路径
model_path = 'data_batch.txt_epoch_2.ckpt.data-00000-of-00001' #数据路径
saver = tf.train.import_meta_graph(meta_path) #加载图
with tf.Session() as sess:
saver.restore(sess, model_path) #加载数据
graph = tf.get_default_graph()
input_pro = graph.get_tensor_by_name('input_pro:0') #加载张量
input_lnc = graph.get_tensor_by_name('input_lnc:0')
true_labels = graph.get_tensor_by_name('true_labels:0')
accuracy = graph.get_tensor_by_name('Accuracy/acc:0')
提示错误:DataLossError (see above for traceback): Unable to open table file .\data_batch.txt_epoch_2.ckpt.data-00000-of-00001: Da