| 238 | REGISTER_GRADIENT_OP("Acosh", AcoshGrad); |
| 239 | |
| 240 | Status AtanhGrad(const Scope& scope, const Operation& op, |
| 241 | const std::vector<Output>& grad_inputs, |
| 242 | std::vector<Output>* grad_outputs) { |
| 243 | // y = atanh(x) |
| 244 | // dy/dx = 1 / (1 - x^2) |
| 245 | auto one = Cast(scope, Const(scope, 1.0), op.input(0).type()); |
| 246 | auto dydx = Reciprocal(scope, Sub(scope, one, Square(scope, op.input(0)))); |
| 247 | // grad(x) = grad(y) * conj(dy/dx) |
| 248 | grad_outputs->push_back( |
| 249 | Mul(scope, grad_inputs[0], ConjugateHelper(scope, dydx))); |
| 250 | return scope.status(); |
| 251 | } |
| 252 | REGISTER_GRADIENT_OP("Atanh", AtanhGrad); |
| 253 | |
| 254 | Status Atan2Grad(const Scope& scope, const Operation& op, |
nothing calls this directly
no test coverage detected