aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/testing
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2018-03-06 14:43:10 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-06 14:48:47 -0800
commit86919effa2c1bfb36d0a3accbbbcd1727bf25cb1 (patch)
tree2d232669107a1afe6e54ea0276684d85c9fd9258 /tensorflow/contrib/testing
parentfb6cebf5e8444c180713c5c3a71c640e30de1c6d (diff)
Fix bug in importing MetaGraphDefs containing nested conds.
This change makes CondContext._external_values more consistently store Tensors external this context. These values are then not added to the context when it's imported. This also removes the workaround I added earlier to manually remove the predicate and pivot Tensors from the context, instead adding them to _external_values were they're automatically excluded. PiperOrigin-RevId: 188083780
Diffstat (limited to 'tensorflow/contrib/testing')
-rw-r--r--tensorflow/contrib/testing/python/framework/fake_summary_writer.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/contrib/testing/python/framework/fake_summary_writer.py b/tensorflow/contrib/testing/python/framework/fake_summary_writer.py
index f2065c6662..15a415df30 100644
--- a/tensorflow/contrib/testing/python/framework/fake_summary_writer.py
+++ b/tensorflow/contrib/testing/python/framework/fake_summary_writer.py
@@ -18,6 +18,7 @@ from __future__ import division
from __future__ import print_function
from tensorflow.core.framework import summary_pb2
+from tensorflow.python.framework import test_util
from tensorflow.python.summary.writer import writer
from tensorflow.python.summary.writer import writer_cache
@@ -85,7 +86,11 @@ class FakeSummaryWriter(object):
if expected_added_graphs is not None:
test_case.assertEqual(expected_added_graphs, self._added_graphs)
if expected_added_meta_graphs is not None:
- test_case.assertEqual(expected_added_meta_graphs, self._added_meta_graphs)
+ test_case.assertEqual(len(expected_added_meta_graphs),
+ len(self._added_meta_graphs))
+ for expected, actual in zip(expected_added_meta_graphs,
+ self._added_meta_graphs):
+ test_util.assert_meta_graph_protos_equal(test_case, expected, actual)
if expected_session_logs is not None:
test_case.assertEqual(expected_session_logs, self._added_session_logs)