Find the Save op and inputs.
| 137 | |
| 138 | // Find the Save op and inputs. |
| 139 | Status FindSaveOp(const Graph* graph, Node** save_op, |
| 140 | std::vector<const Edge*>* in_edges, bool* found) { |
| 141 | *found = false; |
| 142 | for (Node* node : graph->op_nodes()) { |
| 143 | if (node->type_string() == "SaveV2") { |
| 144 | // We found multiple save ops. |
| 145 | if (*found) { |
| 146 | return errors::InvalidArgument("Input graph has multiple SaveV2 ops."); |
| 147 | } |
| 148 | *save_op = node; |
| 149 | *found = true; |
| 150 | TF_RETURN_IF_ERROR(node->input_edges(in_edges)); |
| 151 | } |
| 152 | } |
| 153 | return Status::OK(); |
| 154 | } |
| 155 | |
| 156 | Node* FindRestoreAllOp(const Graph* graph, StringPiece save_prefix) { |
| 157 | for (Node* node : graph->op_nodes()) { |
no test coverage detected