1

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!

Yibin Lin
  • 681
  • 1
  • 6
  • 20
  • please note that ['thanks'](https://meta.stackoverflow.com/questions/288160/no-thanks-damn-it) and ['greetings'](https://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts) are considered bad style for this type of FAQ site. Wanted to pass along the info, as I recently learned it! – Free Url Dec 22 '17 at 12:57

1 Answers1

2

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.

Steven
  • 5,134
  • 2
  • 27
  • 38
  • Thanks Steven - do you mean that the evaluation data can be a continuous stream, and the steps parameter is about how many data points we want to evaluate? – Yibin Lin Oct 11 '16 at 21:13
  • Exactly what I'm referring to. I'm not sure if it accepts functions as an argument in 0.9 or even in 0.11 but they were planning to add it in at some point. – Steven Oct 11 '16 at 22:06
  • @Steven, can you clarify what you mean by claiming that the steps parameter sets how many data points are evaluated? When using the function with varying steps, I am only seeing it evaluate 128 examples, regardless of the number of input examples that are passed, less than or greater than 128. Am I misunderstanding your explanation? – Free Url Dec 22 '17 at 12:54