| 377 | } |
| 378 | |
| 379 | Status SymbolicGradientBuilder::CallGradFunction( |
| 380 | const Operation& op, |
| 381 | const std::vector<Output>& grad_inputs, |
| 382 | std::vector<Output>* grad_outputs) { |
| 383 | ops::GradFunc grad_fn; |
| 384 | TF_RETURN_IF_ERROR(registry_->Lookup(op.node()->type_string(), &grad_fn)); |
| 385 | TF_RETURN_IF_ERROR(grad_fn(scope_, op, grad_inputs, grad_outputs)); |
| 386 | TF_RETURN_IF_ERROR(scope_.status()); |
| 387 | return Status::OK(); |
| 388 | } |
| 389 | |
| 390 | Status SymbolicGradientBuilder::ProcessWhileLoop(Node* exit_node, |
| 391 | const Output& summed_grads) { |