diff options
author | Shanqing Cai <cais@google.com> | 2018-03-12 19:33:52 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-12 19:37:39 -0700 |
commit | 7144571f2fc59c8705e4e3d7b922fa0ebf44f3fa (patch) | |
tree | b14683f826541c183c1bb783265e13b565469fbb /tensorflow/tools/graph_transforms | |
parent | 2bda52d485c9715dcd17f49526cea7890e091cb8 (diff) |
Merge changes from github.
PiperOrigin-RevId: 188817194
Diffstat (limited to 'tensorflow/tools/graph_transforms')
-rw-r--r-- | tensorflow/tools/graph_transforms/BUILD | 2 | ||||
-rw-r--r-- | tensorflow/tools/graph_transforms/remove_control_dependencies.cc | 29 |
2 files changed, 15 insertions, 16 deletions
diff --git a/tensorflow/tools/graph_transforms/BUILD b/tensorflow/tools/graph_transforms/BUILD index fba39526b2..b7d7fac315 100644 --- a/tensorflow/tools/graph_transforms/BUILD +++ b/tensorflow/tools/graph_transforms/BUILD @@ -132,8 +132,8 @@ cc_library( "//tensorflow/core:tensorflow", "//tensorflow/contrib/rnn:gru_ops_op_lib", "//tensorflow/contrib/rnn:lstm_ops_op_lib", + "//tensorflow/core/kernels:quantization_utils", ] + if_not_windows([ - "//tensorflow/core/kernels:quantized_ops", "//tensorflow/core/kernels:remote_fused_graph_rewriter_transform", "//tensorflow/core/kernels/hexagon:hexagon_rewriter_transform", ]), diff --git a/tensorflow/tools/graph_transforms/remove_control_dependencies.cc b/tensorflow/tools/graph_transforms/remove_control_dependencies.cc index a900ee65b0..cba6b78fc5 100644 --- a/tensorflow/tools/graph_transforms/remove_control_dependencies.cc +++ b/tensorflow/tools/graph_transforms/remove_control_dependencies.cc @@ -24,24 +24,23 @@ namespace graph_transforms { // inputs which are referenced with "^tensor_name". // See node_def.proto for more details. Status RemoveControlDependencies(const GraphDef& input_graph_def, - const TransformFuncContext& context, - GraphDef* output_graph_def) { - output_graph_def->Clear(); - for (const NodeDef& node : input_graph_def.node()) { - NodeDef* new_node = output_graph_def->mutable_node()->Add(); - *new_node = node; - new_node->clear_input(); - for (const auto& input : node.input()) { - if (input[0] != '^') { - new_node->add_input(input); - } + const TransformFuncContext& context, + GraphDef* output_graph_def) { + output_graph_def->Clear(); + for (const NodeDef& node : input_graph_def.node()) { + NodeDef* new_node = output_graph_def->mutable_node()->Add(); + *new_node = node; + new_node->clear_input(); + for (const auto& input : node.input()) { + if (input[0] != '^') { + new_node->add_input(input); + } + } } - } - return Status::OK(); + return Status::OK(); } -REGISTER_GRAPH_TRANSFORM("remove_control_dependencies", - RemoveControlDependencies); +REGISTER_GRAPH_TRANSFORM("remove_control_dependencies", RemoveControlDependencies); } // namespace graph_transforms } // namespace tensorflow |