简体   繁体   中英

Tensorflow: How can I restore model for training? (Python)

I want to train a cnn for 20000 steps. In the 100th step I want to save all variables and after that I want to re-run my code restoring model and starting from the 100th step. I am trying to make it work with tensorflow documentation: https://www.tensorflow.org/versions/r0.10/how_tos/variables/index.html but I can't. Any help?

Im stuck in something similar but maybe this link can help you. Im new in tensorflow but i think you cant restore and fit without need to training again you model.

此功能仍然不稳定,并且文档已经过时,因此令人困惑,对我有用的(这是来自google的直接在tensorflow上工作的人的建议)是在训练之前在模型的构造函数上使用model_dir参数这将告诉您存储模型的位置,在训练之后,您只需使用相同的model_dir再次实例化模型,它将从生成的文件和检查点中恢复模型。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM