diff options
Diffstat (limited to 'tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc')
-rw-r--r-- | tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc b/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc index 7ec7752f25..37fe5fa3d7 100644 --- a/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc +++ b/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc @@ -25,14 +25,18 @@ limitations under the License. namespace toco { -bool RemoveTensorFlowIdentity::Run(Model* model, std::size_t op_index) { +::tensorflow::Status RemoveTensorFlowIdentity::Run(Model* model, + std::size_t op_index, + bool* modified) { + *modified = false; const auto passthru_it = model->operators.begin() + op_index; const auto* passthru_op = passthru_it->get(); if (passthru_op->type != OperatorType::kIdentity) { - return false; + return ::tensorflow::Status::OK(); } - return RemoveTrivialPassthroughOp(this, model, op_index); + *modified = RemoveTrivialPassthroughOp(this, model, op_index); + return ::tensorflow::Status::OK(); } } // namespace toco |