diff options
author | 2017-07-13 16:40:01 -0700 | |
---|---|---|
committer | 2017-07-13 16:43:54 -0700 | |
commit | c311449c76433be7ead189c0acc7202d2e884513 (patch) | |
tree | be197fd2dff429f10bde26206afc3be75c4f990b /tensorflow/core/util/equal_graph_def.h | |
parent | cfd0bf52094e637b516c71164761c7687e0af134 (diff) |
Add "gradients" subscope when generating gradients in C/++
This makes visualizing the graph easier and is also what Python does.
PiperOrigin-RevId: 161884431
Diffstat (limited to 'tensorflow/core/util/equal_graph_def.h')
-rw-r--r-- | tensorflow/core/util/equal_graph_def.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tensorflow/core/util/equal_graph_def.h b/tensorflow/core/util/equal_graph_def.h index 14f5bdfda4..0e7f2950cb 100644 --- a/tensorflow/core/util/equal_graph_def.h +++ b/tensorflow/core/util/equal_graph_def.h @@ -56,11 +56,13 @@ bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField<NodeDef>& actual, string* diff, const EqualGraphDefOptions& options = {}); -#define TF_EXPECT_GRAPH_EQ(expected, actual) \ - do { \ - string diff; \ - EXPECT_TRUE(EqualGraphDef(actual, expected, &diff)) \ - << diff << "\nActual: " << SummarizeGraphDef(actual); \ +#define TF_EXPECT_GRAPH_EQ(expected, actual) \ + do { \ + string diff; \ + EXPECT_TRUE(EqualGraphDef(actual, expected, &diff)) \ + << diff << "\nExpected:\n" \ + << SummarizeGraphDef(expected) << "\nActual:\n" \ + << SummarizeGraphDef(actual); \ } while (false) } // namespace tensorflow |