TODO(ashwinm): Expand this to add more structural checks.
| 32 | |
| 33 | // TODO(ashwinm): Expand this to add more structural checks. |
| 34 | Status StructureVerifier::Verify(const GraphDef& graph) { |
| 35 | StatusGroup status_group; |
| 36 | |
| 37 | FunctionLibraryDefinition function_library(OpRegistry::Global(), |
| 38 | graph.library()); |
| 39 | status_group.Update(tensorflow::graph::ValidateGraphDefAgainstOpRegistry( |
| 40 | graph, function_library)); |
| 41 | status_group.Update(tensorflow::graph::VerifyNoDuplicateNodeNames(graph)); |
| 42 | |
| 43 | std::vector<const NodeDef*> topo_order; |
| 44 | status_group.Update(ComputeTopologicalOrder(graph, &topo_order)); |
| 45 | return status_group.as_concatenated_status(); |
| 46 | } |
| 47 | |
| 48 | } // end namespace grappler |
| 49 | } // end namespace tensorflow |