aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/math_grad.py
diff options
context:
space:
mode:
authorGravatar Patrick Nguyen <drpng@google.com>2017-01-12 18:09:40 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-12 18:33:38 -0800
commit769496bb0d3093a5531268635d364950c93327d6 (patch)
tree52c41f118733eecdbcd470a5cf12c37100a1e7e0 /tensorflow/python/ops/math_grad.py
parentbb4d61d06a47d9783e4f3b66161fcfc084ab2273 (diff)
Merge changes from github.
Change: 144396000
Diffstat (limited to 'tensorflow/python/ops/math_grad.py')
-rw-r--r--tensorflow/python/ops/math_grad.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/python/ops/math_grad.py b/tensorflow/python/ops/math_grad.py
index 6f4473885e..e0232b35f0 100644
--- a/tensorflow/python/ops/math_grad.py
+++ b/tensorflow/python/ops/math_grad.py
@@ -628,7 +628,7 @@ def _DivGrad(op, grad):
y = math_ops.conj(y)
return (array_ops.reshape(math_ops.reduce_sum(math_ops.div(grad, y), rx), sx),
array_ops.reshape(
- math_ops.reduce_sum(grad * math_ops.div(-x, math_ops.square(y)),
+ math_ops.reduce_sum(grad * math_ops.div(math_ops.div(-x, y), y),
ry), sy))
@@ -658,7 +658,7 @@ def _RealDivGrad(op, grad):
return (array_ops.reshape(
math_ops.reduce_sum(math_ops.realdiv(grad, y), rx),
sx), array_ops.reshape(
- math_ops.reduce_sum(grad * math_ops.realdiv(-x, math_ops.square(y)),
+ math_ops.reduce_sum(grad * math_ops.realdiv(math_ops.realdiv(-x, y), y),
ry), sy))