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

Function CallGradFunction

tensorflow/cc/gradients/grad_testutil.cc:23–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace test {
22
23Status CallGradFunction(const Scope& scope, const Operation& op,
24 const std::vector<Output>& grad_inputs,
25 std::vector<Output>* grad_outputs) {
26 ops::GradFunc grad_fn;
27 TF_RETURN_IF_ERROR(ops::GradOpRegistry::Global()->Lookup(
28 op.node()->type_string(), &grad_fn));
29 TF_RETURN_IF_ERROR(grad_fn(scope, op, grad_inputs, grad_outputs));
30 TF_RETURN_IF_ERROR(scope.status());
31 return Status::OK();
32}
33
34} // end namespace test
35} // end namespace tensorflow

Callers 1

AddGradientsMethod · 0.85

Calls 4

grad_fnFunction · 0.50
LookupMethod · 0.45
nodeMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected