diff options
author | Yao Zhang <yaozhang@google.com> | 2018-02-02 09:00:41 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-02-02 10:52:39 -0800 |
commit | 355c6ac2bdaab1c1748c2a64a851283e205a90ba (patch) | |
tree | 54934fac6e4c04028556e0fe575a1016c8103b72 /tensorflow/python/grappler | |
parent | 28c80ca9d230fb8b235044702b1d96f9be6c1f10 (diff) |
Disable graph optimizations (CSE) in test so that constant nodes are not deduped.
PiperOrigin-RevId: 184289685
Diffstat (limited to 'tensorflow/python/grappler')
-rw-r--r-- | tensorflow/python/grappler/layout_optimizer_test.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/python/grappler/layout_optimizer_test.py b/tensorflow/python/grappler/layout_optimizer_test.py index 332ee725f0..5bc9e4b803 100644 --- a/tensorflow/python/grappler/layout_optimizer_test.py +++ b/tensorflow/python/grappler/layout_optimizer_test.py @@ -157,6 +157,7 @@ def _get_config(layout_optimizer=True): graph_options = config_pb2.GraphOptions( rewrite_options=rewrite_options, build_cost_model=1) config = config_pb2.ConfigProto(graph_options=graph_options) + config.graph_options.optimizer_options.opt_level = -1 return config @@ -1171,7 +1172,7 @@ class LayoutOptimizerTest(test.TestCase): num_transposes += 1 nodes.append(node.name) - expected_num_transposes = 2 + expected_num_transposes = 3 self.assertEqual(expected_num_transposes, num_transposes) self._assert_trans_nhwc_to_nchw('map/while/Conv2D-0', nodes) self._assert_trans_nchw_to_nhwc('map/while/Add-0-2', nodes) |