tf.executing_eagerly

Returns True if the current thread has eager execution enabled.

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.executing_eagerly

Eager execution is typically enabled via tf.compat.v1.enable_eager_execution, but may also be enabled within the context of a Python function via tf.contrib.eager.py_func.