From 982adcabd6b1c3c0f29d3c0490f4893402324fd8 Mon Sep 17 00:00:00 2001 From: zhaodezan Date: Fri, 2 Apr 2021 15:55:02 +0800 Subject: [PATCH] fix model_parser bug --- .../lite/tools/converter/parser/tflite/tflite_model_parser.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mindspore/lite/tools/converter/parser/tflite/tflite_model_parser.cc b/mindspore/lite/tools/converter/parser/tflite/tflite_model_parser.cc index 070a3106b7..94b5f46a38 100644 --- a/mindspore/lite/tools/converter/parser/tflite/tflite_model_parser.cc +++ b/mindspore/lite/tools/converter/parser/tflite/tflite_model_parser.cc @@ -370,9 +370,7 @@ STATUS TfliteModelParser::ConvertConstTensor(const tflite::TensorT *tensor, cons const auto &data = tflite_model_buffers.at(tensor->buffer)->data; std::string shape_str; - if (data.empty()) { - shape_vector = {}; - } else if (type_id == kObjectTypeString) { + if (type_id == kObjectTypeString) { shape_str += std::to_string(tensor->shape.size()) + ","; for (auto &dim : tensor->shape) { shape_str += std::to_string(dim) + ",";