Commit 81e456dd authored by Ruoxin Sang's avatar Ruoxin Sang Committed by A. Unique TensorFlower
Browse files

Clarify which part of the StandardEvaluator functions is in eager or graph mode.

PiperOrigin-RevId: 365133146
parent 207e8ed8
...@@ -244,9 +244,11 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta): ...@@ -244,9 +244,11 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
state = eval_reduce(state, step_outputs) state = eval_reduce(state, step_outputs)
return eval_end(state) return eval_end(state)
Calls to `eval_begin`, `eval_reduce`, and `eval_end` are always done in eager Calls to `eval_begin` and `eval_end` are always done in eager
mode, while `eval_step` may be compiled with `tf.function` as determined by mode, while `eval_step` may be compiled with `tf.function` as determined by
the `options` passed to `__init__`. the `options` passed to `__init__`. `eval_reduce` is in eager mode if
`use_tf_while_loop=False` in `StandardEvaluatorOptions`, but in graph mode if
`use_tf_while_loop=True`.
This class does not support completely evaluating multiple different datasets This class does not support completely evaluating multiple different datasets
(i.e., where every example of each dataset should be processed, as opposed to (i.e., where every example of each dataset should be processed, as opposed to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment