Commit 9183a2ea authored by Asim Shankar's avatar Asim Shankar Committed by TensorFlower Gardener
Browse files

eager: Bugfix for tfe.gradients_function() involving the "Pow" operator.

"Pow" was incorrectly marked as an operation whose gradient doesn't use its
output. As a result the following:

def f(x): return tf.pow(x, 3)
g = tfe.gradients_function(f)(10)

would raise an execption like:

tensorflow/python/ops/math_grad.py in _PowGrad(op, grad)
    792   x = op.inputs[0]
    793   y = op.inputs[1]
--> 794   z = op.outputs[0]
    795   sx = array_ops.shape(x)
    796   sy = array_ops.shape(y)

TypeError: 'NoneType' object has no attribute '__getitem__'
PiperOrigin-RevId: 169547088
parent 78c024df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment