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
Loading
Please sign in to comment