MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _AtanGrad

Function _AtanGrad

tensorflow/python/ops/math_grad.py:1050–1058  ·  view source on GitHub ↗

Returns grad * 1/ (1 + x^2).

(op, grad)

Source from the content-addressed store, hash-verified

1048
1049@ops.RegisterGradient("Atan")
1050def _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")

Callers

nothing calls this directly

Calls 4

control_dependenciesMethod · 0.45
squareMethod · 0.45
constantMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected