| 265 | REGISTER_GRADIENT_OP("Atan2", Atan2Grad); |
| 266 | |
| 267 | Status SigmoidGrad(const Scope& scope, const Operation& op, |
| 268 | const std::vector<Output>& grad_inputs, |
| 269 | std::vector<Output>* grad_outputs) { |
| 270 | // Use the built-in operator. |
| 271 | // Note that the built-in operator does not return the conjugate of |
| 272 | // the gradient. |
| 273 | auto grad = grad_inputs[0]; |
| 274 | // Optimization to avoid calculating conj(y) until the gradient is |
| 275 | // evaluated. |
| 276 | Scope grad_scope = scope.WithControlDependencies(grad); |
| 277 | auto y = ConjugateHelper(grad_scope, op.output(0)); |
| 278 | grad_outputs->push_back(internal::SigmoidGrad(grad_scope, y, grad)); |
| 279 | return grad_scope.status(); |
| 280 | } |
| 281 | REGISTER_GRADIENT_OP("Sigmoid", SigmoidGrad); |
| 282 | |
| 283 | Status SignGrad(const Scope& scope, const Operation& op, |
nothing calls this directly
no test coverage detected