aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/slim/python/slim/evaluation.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/slim/python/slim/evaluation.py')
-rw-r--r--tensorflow/contrib/slim/python/slim/evaluation.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/tensorflow/contrib/slim/python/slim/evaluation.py b/tensorflow/contrib/slim/python/slim/evaluation.py
index cdb720b36b..2d4b08df61 100644
--- a/tensorflow/contrib/slim/python/slim/evaluation.py
+++ b/tensorflow/contrib/slim/python/slim/evaluation.py
@@ -153,8 +153,7 @@ def evaluate_once(master,
summary_op=_USE_DEFAULT,
summary_op_feed_dict=None,
variables_to_restore=None,
- session_config=None,
- hooks=None):
+ session_config=None):
"""Evaluates the model at the given checkpoint path.
Args:
@@ -178,8 +177,6 @@ def evaluate_once(master,
slim.variables.GetVariablesToRestore() is used.
session_config: An instance of `tf.ConfigProto` that will be used to
configure the `Session`. If left as `None`, the default will be used.
- hooks: A list of additional `SessionRunHook` objects to pass during the
- evaluation.
Returns:
The value of `final_op` or `None` if `final_op` is `None`.
@@ -187,13 +184,11 @@ def evaluate_once(master,
if summary_op == _USE_DEFAULT:
summary_op = summary.merge_all()
- all_hooks = [evaluation.StopAfterNEvalsHook(num_evals),]
+ hooks = [evaluation.StopAfterNEvalsHook(num_evals),]
if summary_op is not None:
- all_hooks.append(evaluation.SummaryAtEndHook(
+ hooks.append(evaluation.SummaryAtEndHook(
log_dir=logdir, summary_op=summary_op, feed_dict=summary_op_feed_dict))
- if hooks is not None:
- all_hooks.extend(hooks)
saver = None
if variables_to_restore is not None:
@@ -208,7 +203,7 @@ def evaluate_once(master,
feed_dict=eval_op_feed_dict,
final_ops=final_op,
final_ops_feed_dict=final_op_feed_dict,
- hooks=all_hooks,
+ hooks=hooks,
config=session_config)
@@ -261,7 +256,7 @@ def evaluation_loop(master,
configure the `Session`. If left as `None`, the default will be used.
timeout: The maximum amount of time to wait between checkpoints. If left as
`None`, then the process will wait indefinitely.
- hooks: A list of additional `SessionRunHook` objects to pass during
+ hooks: A list of additional SessionRunHook objects to pass during
repeated evaluations.
Returns: