首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在tensorflow估计中,num_epochs是什么意思?

在tensorflow估计中,num_epochs是什么意思?
EN

Stack Overflow用户
提问于 2018-04-10 19:34:06
回答 1查看 1.1K关注 0票数 6

对于tensorflow估计器tf.estimator.inputs.numpy_input_fn 这里的文档,特别是关于num_epochs上的行,我真的很困惑

num_epochs: Integer, number of epochs to iterate over data. If None will run forever.

如果我将num_epochs设置为None,培训将永远运行?

它永远运行到底意味着什么??

这对我来说毫无意义,因为我无法想象人们设计这个程序的方式可能会永远运行下去。

有人能解释一下吗?

回答我自己的问题:我想我在这里找到了答案:模型

具体来说,在Building the input_fn部分

Two additional arguments are provided: num_epochs: controls the number of epochs to iterate over data. For training, set this to None, so the input_fn keeps returning data until the required number of train steps is reached. For evaluate and predict, set this to 1, so the input_fn will iterate over the data once and then raise OutOfRangeError. That error will signal the Estimator to stop evaluate or predict.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-04-10 21:27:36

如果num_epochsNone,则代码将无限地迭代数据集。它将永远运行,允许您随时手动停止训练。例如,您可以手动监视您的培训和测试损失(和/或任何其他指标),以便在模型收敛或开始过度拟合时停止培训。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49761611

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档