Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

能不能在example里加一下如何训练时评估的说明? #70

Open
GitLD opened this issue Mar 16, 2020 · 4 comments
Open

能不能在example里加一下如何训练时评估的说明? #70

GitLD opened this issue Mar 16, 2020 · 4 comments

Comments

@GitLD
Copy link

GitLD commented Mar 16, 2020

看见example里的几个例子都是先train,然后predict,常规都是训练隔一段看看val性能好不好,对于这种训练时的评估如何执行呢?

@GitLD
Copy link
Author

GitLD commented Mar 16, 2020

@xixiaoyao 能帮忙说明一下吗?

@xixiaoyao
Copy link
Contributor

感谢建议,我们近期会考虑增加一个example。如果希望细粒度的控制训练过程(比如训练一些step后做eval等其他事情),有两种做法:

一种是调用train_one_step而不是train函数来控制(train_one_step被调用一次,则会训练一个step),通过该API训练一定step后再调用eval函数即可。

另一种是通过设置saver来周期性的保存下来模型checkpoints,然后依次遍历checkpoint进行evaluation,这种方式可以加快训练速度(训练与eval可以并行进行)

@GitLD
Copy link
Author

GitLD commented Mar 17, 2020

谢谢,我试一下

@GitLD
Copy link
Author

GitLD commented Mar 17, 2020

@xixiaoyao 另外,我在实际测试一个example的时候预测段发生了问题见Issue #71,是相关的版本问题吗?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants