aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/estimator
diff options
context:
space:
mode:
authorGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-20 04:36:52 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-20 04:37:03 -0700
commit78909bf81e99e705f74930e2ef9687c6e30dcbf6 (patch)
tree1010765dbf2c7eb0342ef206418ee9e086aec98d /tensorflow/contrib/estimator
parent6533c5a8ade658568a82c3c7bb9d1368a641c0a3 (diff)
parent653b290777cff0d46a669bef0e67c995c762d99d (diff)
Merge pull request #20822 from jperl:jperl-patch-1
PiperOrigin-RevId: 205380346
Diffstat (limited to 'tensorflow/contrib/estimator')
-rw-r--r--tensorflow/contrib/estimator/python/estimator/hooks.py2
-rw-r--r--tensorflow/contrib/estimator/python/estimator/hooks_test.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/contrib/estimator/python/estimator/hooks.py b/tensorflow/contrib/estimator/python/estimator/hooks.py
index ddd6aa442f..caadafdfa6 100644
--- a/tensorflow/contrib/estimator/python/estimator/hooks.py
+++ b/tensorflow/contrib/estimator/python/estimator/hooks.py
@@ -189,7 +189,7 @@ class InMemoryEvaluatorHook(training.SessionRunHook):
init_fn=feed_variables, copy_from_scaffold=self._scaffold)
with self._graph.as_default():
- return self._estimator._evaluate_run(
+ self._estimator._evaluate_run(
checkpoint_path=None,
scaffold=scaffold,
update_op=self._update_op,
diff --git a/tensorflow/contrib/estimator/python/estimator/hooks_test.py b/tensorflow/contrib/estimator/python/estimator/hooks_test.py
index 95ae971852..ee88d5ecf5 100644
--- a/tensorflow/contrib/estimator/python/estimator/hooks_test.py
+++ b/tensorflow/contrib/estimator/python/estimator/hooks_test.py
@@ -102,6 +102,7 @@ class InMemoryEvaluatorHookTest(test.TestCase):
self.assertTrue(os.path.isdir(estimator.eval_dir()))
step_keyword_to_value = summary_step_keyword_to_value_mapping(
estimator.eval_dir())
+
# 4.5 = sum(range(10))/10
# before training
self.assertEqual(4.5, step_keyword_to_value[0]['mean_of_features'])
@@ -110,6 +111,7 @@ class InMemoryEvaluatorHookTest(test.TestCase):
self.assertEqual(4.5, step_keyword_to_value[8]['mean_of_features'])
# end
self.assertEqual(4.5, step_keyword_to_value[10]['mean_of_features'])
+ self.assertEqual(set([0, 4, 8, 10]), set(step_keyword_to_value.keys()))
def test_uses_latest_variable_value(self):