aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib
diff options
context:
space:
mode:
authorGravatar Jianwei Xie <xiejw@google.com>2017-07-19 09:01:15 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-19 09:05:56 -0700
commit80d4b2bccc1e632d4ae4679091b8af2c0c521fb3 (patch)
treef12b4cb0ebc041039608b75ace992890036157a1 /tensorflow/contrib
parent41803db36d4f4a3239bd81e5d460eb0e6e2eea88 (diff)
Adds a warning if the evaluation steps are 0
PiperOrigin-RevId: 162491844
Diffstat (limited to 'tensorflow/contrib')
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/estimator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/contrib/learn/python/learn/estimators/estimator.py b/tensorflow/contrib/learn/python/learn/estimators/estimator.py
index c3cf5662c2..b9201cc805 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/estimator.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/estimator.py
@@ -838,6 +838,10 @@ class BaseEstimator(
hooks = hooks[:] if hooks else []
if feed_fn:
hooks.append(basic_session_run_hooks.FeedFnHook(feed_fn))
+ if steps == 0:
+ logging.warning('evaluation steps are 0. If `input_fn` does not raise'
+ 'OutOfRangeError`, the evaluation will never stop.'
+ 'Use steps=None if intended.')
if steps:
hooks.append(
evaluation.StopAfterNEvalsHook(