简体   繁体   English

ValueError:传递的 save_path 不是有效的检查点:modeltest.ckpt

[英]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.

相关问题 ValueError:传递的保存路径不是有效的检查点:/content/gdrive/My Drive\model\20191003053122/variables/variables - ValueError: The passed save_path is not a valid checkpoint: /content/gdrive/My Drive\model\20191003053122/variables/variables 文件“ test_hdfs.py”,save_path = saver.save(sess,hdfs_path +“ save_net.ckpt”)“ {}的父目录不存在,无法保存。”。format(save_path)) - File “test_hdfs.py”, save_path = saver.save(sess, hdfs_path+“save_net.ckpt”) “Parent directory of {} doesn't exist, can't save.”.format(save_path)) Tensorflow:ValueError:在单次检测中为 None 时无法加载 save_path - Tensorflow: ValueError: Can't load save_path when it is None in single shot detection ValueError:保存Tensorflow检查点时无需保存变量 - ValueError: No variables to save when saving Tensorflow checkpoint Raspberry上的Tensorflow:-使用无效的保存路径'./model.ckpt'进行恢复 文件路径是:“ ./ model.ckpt” - Tensorflow on Raspberry:- Restore called with invalid save path './model.ckpt'. file path is: './model.ckpt' 在训练模型时总是得到“将检查点保存到路径训练/model.ckpt” - While train the model always getting "Saving checkpoint to path training/model.ckpt" 如何恢复 tensorflow inceptions 检查点文件(ckpt)? - How to restore tensorflow inceptions checkpoint file (ckpt)? Tensorflow 和 Keras 无法加载 .ckpt 保存 - Tensorflow & Keras can't load .ckpt save TensorFlow检查点保存并读取 - TensorFlow checkpoint save and read 使用 Tensorflow 保存检查点 - save checkpoint with Tensorflow
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM