| 1341 | } |
| 1342 | |
| 1343 | void FunctionLibraryDefinition::Remove( |
| 1344 | const std::vector<string>& funcs, |
| 1345 | const std::vector<string>& funcs_with_grads) { |
| 1346 | for (const string& f : funcs) { |
| 1347 | Status s = RemoveFunctionHelper(f); |
| 1348 | DCHECK(s.ok()); |
| 1349 | } |
| 1350 | for (const string& f : funcs_with_grads) { |
| 1351 | Status s = RemoveGradient(f); |
| 1352 | DCHECK(s.ok()); |
| 1353 | } |
| 1354 | } |
| 1355 | |
| 1356 | string FunctionLibraryDefinition::FindGradient(const string& func) const { |
| 1357 | tf_shared_lock l(mu_); |