saver.restore()遇到的錯誤


運行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")

運行就通過了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM