运行python程序执行  saver.restore(sess,"E:/pythonFile/untitled/deepLearning/model/model.ckpt")  出行错误,下面报错是

NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for E:/pythonFile/untitled/deepLearning/model/model.ckpt
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

自己百度了,试了没用,然后就自己抱着试一试的态度,打开checkpoint文件里面出现

model_checkpoint_path: "E:/pythonFile/untitled/deepLearning/model/model.ckpt-27510"
all_model_checkpoint_paths: "E:/pythonFile/untitled/deepLearning/model/model.ckpt-27510"

然后结合错误信息,是路径错误,改为

saver.restore(sess,"E:/pythonFile/untitled/deepLearning/model/model.ckpt-27510")

运行就通过了。

saver.restore()遇到的错误的更多相关文章

  1. 深度学习原理与框架-CNN在文本分类的应用 1.tf.nn.embedding_lookup(根据索引数据从数据中取出数据) 2.saver.restore(加载sess参数)

    1. tf.nn.embedding_lookup(W, X) W的维度为[len(vocabulary_list), 128], X的维度为[?, 8],组合后的维度为[?, 8, 128] 代码说 ...

  2. 深度学习原理与框架-猫狗图像识别-卷积神经网络(代码) 1.cv2.resize(图片压缩) 2..get_shape()[1:4].num_elements(获得最后三维度之和) 3.saver.save(训练参数的保存) 4.tf.train.import_meta_graph(加载模型结构) 5.saver.restore(训练参数载入)

    1.cv2.resize(image, (image_size, image_size), 0, 0, cv2.INTER_LINEAR) 参数说明:image表示输入图片,image_size表示变 ...

  3. 由浅入深之Tensorflow(4)----Saver&restore

    x = tf.placeholder(tf.float32) y = tf.placeholder(tf.float32) w = tf.Variable(tf.zeros([1, 1], dtype ...

  4. 解决tensorflow Saver.restore()无效的问题

    解决tensorflow 的 Saver.restore()无法从本地读取变量的问题 最近做tensorflow 手写数字识别的时候遇到了一个问题,Saver的restore()方法无法从本地恢复变量 ...

  5. restore not found的错误(问题2)

    最近在写gan,那么就牵扯到在一个session中加载两个图,restore的时候会有问题.如这篇文章写的(http://blog.csdn.net/u014659656/article/detail ...

  6. Tensorflow保存神经网络参数有妙招:Saver和Restore

    摘要:这篇文章将讲解TensorFlow如何保存变量和神经网络参数,通过Saver保存神经网络,再通过Restore调用训练好的神经网络. 本文分享自华为云社区<[Python人工智能] 十一. ...

  7. 图融合之加载子图:Tensorflow.contrib.slim与tf.train.Saver之坑

    import tensorflow as tf import tensorflow.contrib.slim as slim import rawpy import numpy as np impor ...

  8. Tensorflow系列——Saver的用法

    摘抄自:https://blog.csdn.net/u011500062/article/details/51728830/ 1.实例 import tensorflow as tf import n ...

  9. tensorflow 1.0 学习:模型的保存与恢复(Saver)

    将训练好的模型参数保存起来,以便以后进行验证或测试,这是我们经常要做的事情.tf里面提供模型保存的是tf.train.Saver()模块. 模型保存,先要创建一个Saver对象:如 saver=tf. ...

随机推荐

  1. 导出dmp

    如果有空表都需要导出执行 select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows= ...

  2. 黄聪:C#获取网页HTML内容的三种方式

    C#通常有三种方法获取网页内容,使用WebClient.WebBrowser或者HttpWebRequest/HttpWebResponse. 方法一:使用WebClient static void ...

  3. 【Algorithm】字符串编辑距离(Levenshtein距离)C++算法实现

    算法实现比较简单,但算法原理不明白,有空了再研究一下. unsigned LevenshteinDistance(const string& s1, const string& s2) ...

  4. C# 6.0:Expression – Bodied Methods

    Expression-bodied 方法是C# 6.0 中另一个能简化代码的特性.我们已经对lambda表达式将funciton和delegation关联起来的这种用法很熟悉了.Expression- ...

  5. EXT.net 图标靠右排列

    toolbar1.Items.Add(Button_1); toolbar1.Items.Add(Button_2); toolbar1.Items.Add(Button_3); toolbar1.I ...

  6. Mono的CustomConditionAttribute使用

    1.Mono的CustomConditionAttribute使用有诸多的限制,没有在XML中定义来的灵活 2.CustomConditionAttribute定义的子类必须和ExtensionAtt ...

  7. Linux 版 SecureCRT 界面变为 Windows 2000 风格的解决办法

    SecureCRT 是一款非常好用的远程终端连接软件,支持 Windows.Linux.macOS 全平台.由于现在工作平台主要在 Linux 系统上,SecureCRT 也是必备软件.一开始安装的是 ...

  8. sc.exe用法详解

    sc.exe是帮助开发 WindowsNT 服务的工具,这里我来说说如何使用好sc.exe. 我们打开命令提示符(以管理员身份运行): 输入sc delete ServiceName(服务名)  即可 ...

  9. Monkey相关参数 笔记

    Monkey相关参数  笔记 Monkey是Android系统自带的一个命令行工具,可运行在模拟器里或实际设备中. Monkey可以向被测试的应用程序发送伪随机的用户事件流(如按键.触屏.手势等),实 ...

  10. 如何简单理解js中this的指向

    前序 每个人学js都会被this指向这个东西搞得很蒙,那就是this的指向问题.首先,我们要明白 this的指向在函数定义的时候是确定不了的,只有函数执行的时候才能确定this到底指向谁,实际上thi ...