diff options
author | 2018-10-04 06:09:42 -0700 | |
---|---|---|
committer | 2018-10-04 06:14:08 -0700 | |
commit | 82ea80b979768c7fe1daa4b50cf054e5a0968f31 (patch) | |
tree | 11d36ac98c1f6b3e4d3e8335188d33cf4a32161d /tensorflow/python/BUILD | |
parent | 2c9369c8d878c913b5dfcd3c27849bcd3d6af6c9 (diff) |
Add option in tf.gradients() to return zero tensors for unconnected gradients.
tf.gradients currently returns [NONE] when the gradient of unconnected variables
is required. This backwards compatable change adds in the option to have zero
tensors returned that match the dimensions of the input tensor.
PiperOrigin-RevId: 215725488
Diffstat (limited to 'tensorflow/python/BUILD')
-rw-r--r-- | tensorflow/python/BUILD | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index fe81254ef7..da3c56db92 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -2152,6 +2152,7 @@ py_library( ":array_grad", ":array_ops", ":bitwise_ops", + ":check_ops", ":cond_v2_impl", ":control_flow_grad", ":control_flow_ops", @@ -2172,8 +2173,11 @@ py_library( ":random_grad", ":resource_variable_ops", ":spectral_grad", + ":tensor_array_ops", + ":tensor_util", ":util", ":variable_scope", + "//tensorflow/core:protos_all_py", "//tensorflow/python/eager:backprop", "//tensorflow/python/eager:context", "//tensorflow/python/eager:tape", |