Browse Source

add int8 support while converting dwconv to conv

tags/v1.1.0
zhujingxuan 5 years ago
parent
commit
fbeeb5b820
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      mindspore/lite/tools/converter/parser/tflite/tflite_model_parser.cc

+ 6
- 0
mindspore/lite/tools/converter/parser/tflite/tflite_model_parser.cc View File

@@ -297,6 +297,12 @@ STATUS TfliteModelParser::ConvertGroupDepthwiseOp(schema::MetaGraphT *sub_graph)
MS_LOG(ERROR) << "Trans depthwiseConv Filter schema::Format failed.";
return RET_ERROR;
}
} else if (weight_tensor->dataType == kNumberTypeInt8) {
auto status = TransFilterFormat<int8_t>(weight_tensor.get(), kKHWC2CHWK);
if (status != RET_OK) {
MS_LOG(ERROR) << "Trans filter format failed.";
return RET_ERROR;
}
} else if (weight_tensor->dataType == kNumberTypeFloat32 || weight_tensor->dataType == kNumberTypeFloat) {
auto status = TransFilterFormat<float>(weight_tensor.get(), kKHWC2CHWK);
if (status != RET_OK) {


Loading…
Cancel
Save