| 136 | } |
| 137 | |
| 138 | string DumpGraphToFile(const string& name, Graph const& graph, |
| 139 | const FunctionLibraryDefinition* flib_def, |
| 140 | const string& dirname) { |
| 141 | GraphDef graph_def; |
| 142 | graph.ToGraphDef(&graph_def); |
| 143 | if (flib_def) { |
| 144 | *graph_def.mutable_library() = flib_def->ToProto(); |
| 145 | } |
| 146 | return DumpGraphDefToFile(name, graph_def, dirname); |
| 147 | } |
| 148 | |
| 149 | string DumpFunctionDefToFile(const string& name, FunctionDef const& fdef, |
| 150 | const string& dirname) { |