Returns True if the current thread has eager execution enabled. 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.
()
| 1590 | |
| 1591 | @tf_export("executing_eagerly") |
| 1592 | def executing_eagerly(): |
| 1593 | """Returns True if the current thread has eager execution enabled. |
| 1594 | |
| 1595 | Eager execution is typically enabled via |
| 1596 | `tf.compat.v1.enable_eager_execution`, but may also be enabled within the |
| 1597 | context of a Python function via tf.contrib.eager.py_func. |
| 1598 | """ |
| 1599 | if context_safe() is None: |
| 1600 | return default_execution_mode == EAGER_MODE |
| 1601 | |
| 1602 | return context().executing_eagerly() |
| 1603 | |
| 1604 | |
| 1605 | def in_eager_mode(): |
no test coverage detected