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

Function CoshGrad

tensorflow/cc/gradients/math_grad.cc:185–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183REGISTER_GRADIENT_OP("Sinh", SinhGrad);
184
185Status CoshGrad(const Scope& scope, const Operation& op,
186 const std::vector<Output>& grad_inputs,
187 std::vector<Output>* grad_outputs) {
188 // y = cosh(x)
189 // dy/dx = sinh(x)
190 auto dydx = Sinh(scope, op.input(0));
191 // grad(x) = grad(y) * conj(dy/dx)
192 grad_outputs->push_back(
193 Mul(scope, grad_inputs[0], ConjugateHelper(scope, dydx)));
194 return scope.status();
195}
196REGISTER_GRADIENT_OP("Cosh", CoshGrad);
197
198Status TanhGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 6

ConjugateHelperFunction · 0.85
SinhFunction · 0.50
MulFunction · 0.50
inputMethod · 0.45
push_backMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected