aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/equal_graph_def.cc
diff options
context:
space:
mode:
authorGravatar Geoffrey Irving <geoffreyi@google.com>2016-01-25 11:06:10 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2016-01-25 13:18:56 -0800
commit2ab8e07fb717c0d1a6dd20b41d0e84986e961335 (patch)
tree27a7de16bf7a64ac51d6eb501631c2a9e60185c6 /tensorflow/core/graph/equal_graph_def.cc
parent1c1825253900acd5aeb76f2ed18fa55d0dee3600 (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.cc9
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()) {