From 39c74da44a8fe40e83d3b0ec24904bc9ce303581 Mon Sep 17 00:00:00 2001 From: Skye Wanderman-Milne Date: Tue, 4 Apr 2017 16:53:37 -0800 Subject: Make ImportGraphDef() work with functions. In addition to modify graph_constructor.cc, this patch adds some other functionality to enable importing fucntions: * Ability to add FunctionDefLibraries to Graphs and FunctionLibraryDefinitions (in addition to existing functions) * FunctionDefsEqual() utility function Change: 152205258 --- tensorflow/core/util/equal_graph_def.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tensorflow/core/util/equal_graph_def.h') diff --git a/tensorflow/core/util/equal_graph_def.h b/tensorflow/core/util/equal_graph_def.h index 82f8bd0713..1ce6181c2e 100644 --- a/tensorflow/core/util/equal_graph_def.h +++ b/tensorflow/core/util/equal_graph_def.h @@ -18,6 +18,7 @@ limitations under the License. #include "tensorflow/core/framework/graph.pb.h" #include "tensorflow/core/framework/graph_def_util.h" +#include "tensorflow/core/platform/protobuf.h" #include "tensorflow/core/platform/types.h" namespace tensorflow { @@ -44,6 +45,14 @@ bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected, bool EqualNodeDef(const NodeDef& actual, const NodeDef& expected, string* diff, const EqualGraphDefOptions& options = {}); +// Determines if actual and expected are equal, ignoring ordering. If they're +// different and diff != nullptr, *diff is set to an explanation of the +// difference. +bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField& actual, + const protobuf::RepeatedPtrField& expected, + string* diff, + const EqualGraphDefOptions& options = {}); + #define TF_EXPECT_GRAPH_EQ(expected, actual) \ do { \ string diff; \ -- cgit v1.2.3