aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/__init__.py
diff options
context:
space:
mode:
authorGravatar Asim Shankar <ashankar@google.com>2018-03-07 16:44:11 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-07 16:48:07 -0800
commit22ff6e7b89384d83556edcf78e15fdfa226371d7 (patch)
tree36c066c6a757c369f23c1a3d290371aea16a1098 /tensorflow/python/__init__.py
parent5ae2d41e7a1daf4b00b24dda683fabf7c283df7c (diff)
eager: Export tf.enable_eager_execution() and tf.executing_eagerly()
PiperOrigin-RevId: 188255674
Diffstat (limited to 'tensorflow/python/__init__.py')
-rw-r--r--tensorflow/python/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tensorflow/python/__init__.py b/tensorflow/python/__init__.py
index d6715fa522..5a9cd7531d 100644
--- a/tensorflow/python/__init__.py
+++ b/tensorflow/python/__init__.py
@@ -139,6 +139,10 @@ from tensorflow.python.ops import state_ops
from tensorflow.python.ops import string_ops
from tensorflow.python.ops import tensor_array_ops
+# Eager execution
+from tensorflow.python.eager.context import executing_eagerly
+from tensorflow.python.framework.ops import enable_eager_execution
+
# Symbols whitelisted for export without documentation.
# TODO(cwhipkey): review these and move to contrib, expose through
# documentation, or remove.
@@ -290,6 +294,12 @@ _allowed_symbols.extend([
'MONOLITHIC_BUILD',
])
+# Eager execution
+_allowed_symbols.extend([
+ 'enable_eager_execution',
+ 'executing_eagerly',
+])
+
# Remove all extra symbols that don't have a docstring or are not explicitly
# referenced in the whitelist.
remove_undocumented(__name__, _allowed_symbols, [