Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now


TensorFlow 2.0 version View source on GitHub

Returns True if the current thread has eager execution enabled.


  • tf.compat.v1.executing_eagerly
  • tf.compat.v2.executing_eagerly
  • tf.contrib.eager.executing_eagerly
  • tf.contrib.eager.in_eager_mode

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.