Returns grad * 1/ (1 + x^2).
(op, grad)
| 1048 | |
| 1049 | @ops.RegisterGradient("Atan") |
| 1050 | def _AtanGrad(op, grad): |
| 1051 | """Returns grad * 1/ (1 + x^2).""" |
| 1052 | x = op.inputs[0] |
| 1053 | with ops.control_dependencies([grad]): |
| 1054 | x = math_ops.conj(x) |
| 1055 | x2 = math_ops.square(x) |
| 1056 | one = constant_op.constant(1, dtype=grad.dtype) |
| 1057 | inv = math_ops.reciprocal(math_ops.add(one, x2)) |
| 1058 | return grad * inv |
| 1059 | |
| 1060 | |
| 1061 | @ops.RegisterGradient("Atan2") |
nothing calls this directly
no test coverage detected