报错信息: 一堆 挑了几个重要的
tensorflow.python.framework.errors_impl.NotFoundError: Key Variable not found in checkpoint
[[{{node save/RestoreV2}} = RestoreV2[dtypes=[DT_FLOAT, 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)]]
During handling of the above exception, another exception occurred:
NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Key Variable not found in checkpoint
[[{{node save/RestoreV2}} = RestoreV2[dtypes=[DT_FLOAT, 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)]]
首先说下 这个问题 是在 saver. restore
saver.restore(sess,path) 这个位置
搞的头疼! 一直搞不定 最后发现
突破点 Key Variable not found in checkpoint 检查点中找不到关键变量
变量什么的 发现自己也都有啊
到底是什么关键变量????
发现 自己在书写 过程中 喜欢加上
with tf.variable_scope('xxx')
所以 把所有with 这个类型的 全删除 再重新 训练 测试 发现 成功解决!
看似 几句话 改了代码无数次 都是泪!