tensorflow 模型保存后的加载路径问题

import tensorflow as tf

#保存模型

saver = tf.train.Saver()

saver.save(sess, "e://code//python//test//package_test//model.ckpt", global_step=step)

#加载读取模型

with tf.Session() as sess:
new_saver=tf.train.import_meta_graph('checkout\\model.ckpt-3500.meta')
new_saver.restore(sess,"E://Code//checkout//./model.ckpt-3500")
sess.run(tf.global_variables_initializer())

按windows的常规路径("E://Code//checkout//model.ckpt-3500“)写,可能会出现异常:

Unsuccessful TensorSliceReader constructor: Failed to find any matching files for E:\Code\python\test\package_test\checkout/model.cpk

上一篇:Chart控件,鼠标选择区域,可以局部放大缩小


下一篇:http://love3400wind.blog.163.com/blog/static/7963080120132794359703/