| 252 | REGISTER_GRADIENT_OP("Atanh", AtanhGrad); |
| 253 | |
| 254 | Status Atan2Grad(const Scope& scope, const Operation& op, |
| 255 | const std::vector<Output>& grad_inputs, |
| 256 | std::vector<Output>* grad_outputs) { |
| 257 | auto y = op.input(0); |
| 258 | auto x = op.input(1); |
| 259 | Output grad_inv = Div(scope, grad_inputs[0], |
| 260 | Add(scope, Square(scope, x), Square(scope, y))); |
| 261 | grad_outputs->push_back(Mul(scope, x, grad_inv)); |
| 262 | grad_outputs->push_back(Mul(scope, Neg(scope, y), grad_inv)); |
| 263 | return scope.status(); |
| 264 | } |
| 265 | REGISTER_GRADIENT_OP("Atan2", Atan2Grad); |
| 266 | |
| 267 | Status SigmoidGrad(const Scope& scope, const Operation& op, |