aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/BUILD
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2018-09-05 11:08:52 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-05 11:14:10 -0700
commita6c4916764392819f3692dc0f763472d22b8076f (patch)
tree84984ebcf2bc121e268946fa65cfdaa95ea94be4 /tensorflow/python/BUILD
parent6aa8abbb17c06fbaeb9cc4396e58b6cfc33d177f (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/BUILD')
-rw-r--r--tensorflow/python/BUILD12
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD
index 5af6437c56..e6169e9e80 100644
--- a/tensorflow/python/BUILD
+++ b/tensorflow/python/BUILD
@@ -2090,6 +2090,18 @@ py_library(
srcs = [
"ops/custom_gradient.py",
"ops/gradients.py",
+ ],
+ srcs_version = "PY2AND3",
+ deps = [
+ ":gradients_impl",
+ "//tensorflow/python/eager:function",
+ "//tensorflow/python/eager:tape",
+ ],
+)
+
+py_library(
+ name = "gradients_impl",
+ srcs = [
"ops/gradients_impl.py",
],
srcs_version = "PY2AND3",