简体   繁体   English

从先前的检查点还原Tensorflow模型

[英]Restoring Tensorflow model from a previous checkpoint

I am tuning my model for 200 episodes by training it 2 times each for 100 episodes. 我正在通过200次训练对我的模型进行200次调整。 The first run for 100 eps is finished and right now 2nd run is going on. 100 eps的第一次运行完成,现在第二次运行正在进行。 My problem is I want to restore the model after it finished the first run that is from the 100th episode. 我的问题是我要在完成第100集的第一次运行后恢复模型。 And now that I have already started the 2nd run, it has overwritten the checkpoint files. 现在我已经开始第二次运行,它已经覆盖了检查点文件。

I came across this post which says tensorflow keeps last 5 models. 我碰到了这篇文章 ,说tensorflow保留最后5个模型。 How can I retrieve the model parameters from the previous checkpoint which was created after the first run? 如何从第一次运行后创建的上一个检查点检索模型参数?

Tensorflow可以在一次运行中保存最好的5个模型,您已经开始了另一次新运行,恐怕您的模型会丢失,您将不得不对其进行重新训练,经验法则始终保持模型的命名动态,因此不会被替换, 例如:

model_name = 'Model_{:d}'.format(episode_number) + '.ckpt'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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