diff options
author | 2018-09-05 11:08:52 -0700 | |
---|---|---|
committer | 2018-09-05 11:14:10 -0700 | |
commit | a6c4916764392819f3692dc0f763472d22b8076f (patch) | |
tree | 84984ebcf2bc121e268946fa65cfdaa95ea94be4 /tensorflow/python/client | |
parent | 6aa8abbb17c06fbaeb9cc4396e58b6cfc33d177f (diff) |
Allow gradients() calls from inside a tfe.defun wrt captured tensors.
This modifies
https://github.com/tensorflow/tensorflow/commit/834da2c3fddab1bbbce742db572cfe65dd320fcd
to work with tfe.defun in addition to the legacy Defun implementation.
PiperOrigin-RevId: 211663702
Diffstat (limited to 'tensorflow/python/client')
-rw-r--r-- | tensorflow/python/client/session_test.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/python/client/session_test.py b/tensorflow/python/client/session_test.py index 052be68385..f87a96e547 100644 --- a/tensorflow/python/client/session_test.py +++ b/tensorflow/python/client/session_test.py @@ -49,6 +49,8 @@ from tensorflow.python.ops import array_ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import data_flow_ops from tensorflow.python.ops import gen_control_flow_ops +# Import gradients to resolve circular imports +from tensorflow.python.ops import gradients # pylint: disable=unused-import from tensorflow.python.ops import gradients_impl from tensorflow.python.ops import math_ops # Import resource_variable_ops for the variables-to-tensor implicit conversion. |