diff options
author | 2016-01-25 11:06:10 -0800 | |
---|---|---|
committer | 2016-01-25 13:18:56 -0800 | |
commit | 2ab8e07fb717c0d1a6dd20b41d0e84986e961335 (patch) | |
tree | 27a7de16bf7a64ac51d6eb501631c2a9e60185c6 /tensorflow/core/graph/equal_graph_def.cc | |
parent | 1c1825253900acd5aeb76f2ed18fa55d0dee3600 (diff) |
Make EqualGraphDef ignore versions and expose to Python
The intention is for EqualGraphDef to be the only way downstream tests compare
GraphDefs in golden file tests.
Change: 112967255
Diffstat (limited to 'tensorflow/core/graph/equal_graph_def.cc')
-rw-r--r-- | tensorflow/core/graph/equal_graph_def.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tensorflow/core/graph/equal_graph_def.cc b/tensorflow/core/graph/equal_graph_def.cc index ddd10bc257..5021aa3d40 100644 --- a/tensorflow/core/graph/equal_graph_def.cc +++ b/tensorflow/core/graph/equal_graph_def.cc @@ -26,13 +26,8 @@ namespace tensorflow { bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected, string* diff) { - if (actual.version() != expected.version()) { - if (diff != nullptr) { - *diff = strings::StrCat("Expected version ", expected.version(), - ", got version ", actual.version()); - } - return false; - } + // Intentionally do not check that versions match so that this routine can + // be used for less brittle golden file tests. std::unordered_map<string, const NodeDef*> actual_index; for (const NodeDef& node : actual.node()) { |