[英]ValueError: The passed save_path is not a valid checkpoint: modeltest.ckpt
I run this code我运行这段代码
tf.reset_default_graph()
v1 = tf.Variable(tf.constant(0.1, shape = [2]), name="v1")
v2 = tf.Variable(tf.constant(0.2, shape = [2]), name="v2")
saver = tf.train.Saver()
with tf.Session() as sess:
saver.restore(sess, "/tmp/model/model.ckpt")
and then this error is occured:ValueError: The passed save_path is not a valid checkpoint: modeltest.ckpt然后出现这个错误:ValueError: The pass save_path is not a valid checkpoint: modeltest.ckpt
this is my env:这是我的环境:
tensorflow (1.10.1)张量流(1.10.1)
tensorboard (1.10.0)张量板(1.10.0)
h5py (2.8.0) h5py (2.8.0)
Python 3.6.5 Python 3.6.5
Could you please advice how to solve out this error您能否建议如何解决此错误
Thank you谢谢
If the model name is "modeltest.ckpt", then you probably have the model in a zip file (modeltest.zip).如果模型名称是“modeltest.ckpt”,那么您可能将模型保存在 zip 文件 (modeltest.zip) 中。 Then you need to extract the model into a folder (named "model\" for example) and it will include 3 files.
然后您需要将模型解压缩到一个文件夹中(例如名为“model\”),它将包含 3 个文件。 Now you can use the name as follows: "model\modeltest.ckpt"
现在您可以使用如下名称:“model\modeltest.ckpt”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.