From bd79cbc578cc3c957dffc7889509485dd9470b57 Mon Sep 17 00:00:00 2001 From: albert-yan Date: Wed, 1 Jun 2022 15:19:51 +0800 Subject: [PATCH] deconv dim compatible --- mindspore/lite/src/runtime/weight_decoder.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mindspore/lite/src/runtime/weight_decoder.h b/mindspore/lite/src/runtime/weight_decoder.h index ff8760522ee..51447940f88 100644 --- a/mindspore/lite/src/runtime/weight_decoder.h +++ b/mindspore/lite/src/runtime/weight_decoder.h @@ -56,6 +56,10 @@ class WeightDecoder { if (op_parameter->type_ == schema::PrimitiveType_MatMulFusion) { return GetMatMulPreferredDim(op_parameter, index, dims); } else if (op_parameter->type_ == schema::PrimitiveType_Conv2dTransposeFusion) { + if (model_version.empty() || + model_version.substr(model_version.size() - first_version_offset, model_version.size()) < "1.8.0") { + return 0; + } return GetDeConvPreferredDim(op_parameter, dims); } else if (op_parameter->type_ == schema::PrimitiveType_Gather) { return GetGatherPreferredDim(op_parameter, in_tensors);