Preserve user placement as much as possible when optimizing the graph
authorBenoit Steiner <bsteiner@google.com>
Fri, 23 Feb 2018 22:22:06 +0000 (14:22 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 23 Feb 2018 22:26:13 +0000 (14:26 -0800)
PiperOrigin-RevId: 186822511

tensorflow/python/grappler/tf_optimizer.i

index 1b65798..de9326c 100644 (file)
@@ -100,6 +100,7 @@ PyObject* TF_OptimizeGraph(
     tensorflow::grappler::ItemConfig item_config;
     item_config.inline_functions = false;
     item_config.apply_optimizations = false;
+    item_config.ignore_user_placement = false;
     std::unique_ptr<tensorflow::grappler::GrapplerItem> grappler_item =
         tensorflow::grappler::GrapplerItemFromMetaGraphDef(graph_id, metagraph, item_config);