| 21 | namespace test { |
| 22 | |
| 23 | Status 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 |
no test coverage detected