tf.contrib.learn.BaseEstimator.evaluate():“步骤”的含义是什么?参数? [英] tf.contrib.learn.BaseEstimator.evaluate(): What is the meaning of the "steps" parameter?
问题描述
根据 https://www.tensorflow。 org / versions / r0.9 / api_docs / python / contrib.learn.html 中,tf.contrib.learn.BaseEstimator.evaluate函数可以采用steps参数。该参数的解释如下:
According to https://www.tensorflow.org/versions/r0.9/api_docs/python/contrib.learn.html, the tf.contrib.learn.BaseEstimator.evaluate function can take in a steps parameter. The parameter is explained as follows:
steps:要评估模型的步骤数。如果为None,则永远评估
。
steps: Number of steps for which to evaluate model. If None, evaluate forever.
如何进行评估?以我的理解,训练过的模型应该只评估一次(即step = 1),然后针对目标标签计算损失,对吧?
How can evaluation have steps? In my understanding, a trained model should be "evaluated" only once (i.e. steps=1), and then calculate the loss against the target labels, right?
谢谢!
推荐答案
您还可以在生成数据的函数上运行经过训练的模型。在这种情况下,您可以生成无限量的数据,并且不想永远运行评估。 (您也可以拥有大量数据,并且批次数量较小,因此再次花费的时间太长)。无论哪种情况,您都只想对一部分人口样本评估模型。
You can also run the trained model on a function that generates data. In which case you can generate an infinite amount of data and don't want to run your evaluation forever. (You can also have a lot of data and small batch size so again it'll take too long). In either case you want to only evaluate the model for some sample of the population.
这篇关于tf.contrib.learn.BaseEstimator.evaluate():“步骤”的含义是什么?参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!