tensorflow restore 時報錯:ValueError: Can't load save_path when it is None.

    我用的是 tensorflow 1.9 GPU 版本,模型意外中斷後想繼續訓練模型。使用 restore 的時候出現瞭如題的報錯。經過檢查,發現是缺乏 checkpoint 文件。

    tensorflow 在保存模型時,會產生以下四個文件:存儲網絡結構.meta、存儲訓練好的參數.data和.index、記錄最新的模型checkpoint。

    當使用 saver.restore(sess, tf.train.latest_checkpoint(path)) 語句恢復模型時,path 是 checkpoint 所在的路徑。如果缺乏 checkpoint 則會報錯。

    

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章