diff options
author | 2018-10-09 11:38:15 -0700 | |
---|---|---|
committer | 2018-10-09 11:48:46 -0700 | |
commit | 12e164d1e7c0b197f06d5d3c2ed26318b89b5e4c (patch) | |
tree | d2f0b6ba463baff8e3607575f41d3655762f3d14 /tensorflow/contrib/lite/toco/graph_transformations/resolve_tensorflow_matmul.cc | |
parent | 931353c5f79c2d419afb3a5ecac59184c5558351 (diff) |
Return ::tensorflow::Status in Toco Graph Transformations.
PiperOrigin-RevId: 216392908
Diffstat (limited to 'tensorflow/contrib/lite/toco/graph_transformations/resolve_tensorflow_matmul.cc')
-rw-r--r-- | tensorflow/contrib/lite/toco/graph_transformations/resolve_tensorflow_matmul.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tensorflow/contrib/lite/toco/graph_transformations/resolve_tensorflow_matmul.cc b/tensorflow/contrib/lite/toco/graph_transformations/resolve_tensorflow_matmul.cc index 65346c4fe4..da039da546 100644 --- a/tensorflow/contrib/lite/toco/graph_transformations/resolve_tensorflow_matmul.cc +++ b/tensorflow/contrib/lite/toco/graph_transformations/resolve_tensorflow_matmul.cc @@ -55,10 +55,13 @@ TransposeOperator* FindTransposeOpWithInput(const Model& model, } // namespace -bool ResolveTensorFlowMatMul::Run(Model* model, std::size_t op_index) { +::tensorflow::Status ResolveTensorFlowMatMul::Run(Model* model, + std::size_t op_index, + bool* modified) { + *modified = false; auto matmul_it = model->operators.begin() + op_index; if (matmul_it->get()->type != OperatorType::kMatMul) { - return false; + return ::tensorflow::Status::OK(); } const auto* matmul_op = static_cast<const TensorFlowMatMulOperator*>(matmul_it->get()); @@ -73,7 +76,7 @@ bool ResolveTensorFlowMatMul::Run(Model* model, std::size_t op_index) { "Not replacing %s by a FullyConnected operator, because it has " "the transpose_a attribute", LogName(*matmul_op)); - return false; + return ::tensorflow::Status::OK(); } // Reorder the axes on the second input. TensorFlow uses row-major ordering @@ -198,7 +201,8 @@ bool ResolveTensorFlowMatMul::Run(Model* model, std::size_t op_index) { // erase the MatMul operator model->operators.erase(matmul_it); - return true; + *modified = true; + return ::tensorflow::Status::OK(); } } // namespace toco |