tf.contrib.learn.BaseEstimator.evaluate(): What is the meaning of the "steps" parameter?

320 views Asked by At

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

There are 1 answers

3
Steven On BEST ANSWER

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.