運行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")
運行就通過了。