|View source on GitHub|
Returns True if executing eagerly, even if inside a graph function.
This function will check the outermost context for the program and see if
it is in eager mode. It is useful comparing to
which checks the current context and will return
False within a
tf.function body. It can be used to build library that behave differently
in eager runtime and v1 session runtime (deprecated).
# A function constructs TensorFlow graphs, it does not execute eagerly,
# but the outer most context is still eager.
assert not tf.executing_eagerly()
<tf.Tensor: shape=(), dtype=bool, numpy=True>
|boolean, whether the outermost context is in eager mode.|