From 12e164d1e7c0b197f06d5d3c2ed26318b89b5e4c Mon Sep 17 00:00:00 2001 From: Yu-Cheng Ling Date: Tue, 9 Oct 2018 11:38:15 -0700 Subject: Return ::tensorflow::Status in Toco Graph Transformations. PiperOrigin-RevId: 216392908 --- .../toco/graph_transformations/resolve_squeeze_attributes.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tensorflow/contrib/lite/toco/graph_transformations/resolve_squeeze_attributes.cc') diff --git a/tensorflow/contrib/lite/toco/graph_transformations/resolve_squeeze_attributes.cc b/tensorflow/contrib/lite/toco/graph_transformations/resolve_squeeze_attributes.cc index e8bb85704e..c601b0774e 100644 --- a/tensorflow/contrib/lite/toco/graph_transformations/resolve_squeeze_attributes.cc +++ b/tensorflow/contrib/lite/toco/graph_transformations/resolve_squeeze_attributes.cc @@ -25,10 +25,13 @@ limitations under the License. namespace toco { -bool ResolveSqueezeAttributes::Run(Model* model, std::size_t op_index) { +::tensorflow::Status ResolveSqueezeAttributes::Run(Model* model, + std::size_t op_index, + bool* modified) { + *modified = false; auto* squeeze_op = model->operators[op_index].get(); if (squeeze_op->type != OperatorType::kSqueeze) { - return false; + return ::tensorflow::Status::OK(); } DCHECK_EQ(squeeze_op->inputs.size(), 1); DCHECK_EQ(squeeze_op->outputs.size(), 1); @@ -42,10 +45,11 @@ bool ResolveSqueezeAttributes::Run(Model* model, std::size_t op_index) { "Reshape op", LogName(*squeeze_op)); - return RemoveTrivialPassthroughOp(this, model, op_index); + *modified = RemoveTrivialPassthroughOp(this, model, op_index); + return ::tensorflow::Status::OK(); } } - return false; + return ::tensorflow::Status::OK(); } } // namespace toco -- cgit v1.2.3