tf.contrib.learn.BaseEstimator.evaluate(): What is

2019-07-23 03:37发布

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: Number of steps for which to evaluate model. If None, evaluate forever.

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?

Thanks!

1条回答
Viruses.
2楼-- · 2019-07-23 04:27

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.

查看更多
登录 后发表回答