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

Function SigmoidGrad

tensorflow/cc/gradients/math_grad.cc:267–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265REGISTER_GRADIENT_OP("Atan2", Atan2Grad);
266
267Status 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}
281REGISTER_GRADIENT_OP("Sigmoid", SigmoidGrad);
282
283Status SignGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 5

ConjugateHelperFunction · 0.85
outputMethod · 0.65
push_backMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected