| 170 | REGISTER_GRADIENT_OP("Log1p", Log1pGrad); |
| 171 | |
| 172 | Status SinhGrad(const Scope& scope, const Operation& op, |
| 173 | const std::vector<Output>& grad_inputs, |
| 174 | std::vector<Output>* grad_outputs) { |
| 175 | // y = sinh(x) |
| 176 | // dy/dx = cosh(x) |
| 177 | auto dydx = Cosh(scope, op.input(0)); |
| 178 | // grad(x) = grad(y) * conj(dy/dx) |
| 179 | grad_outputs->push_back( |
| 180 | Mul(scope, grad_inputs[0], ConjugateHelper(scope, dydx))); |
| 181 | return scope.status(); |
| 182 | } |
| 183 | REGISTER_GRADIENT_OP("Sinh", SinhGrad); |
| 184 | |
| 185 | Status CoshGrad(const Scope& scope, const Operation& op, |