From 6e62de56d16c44b847356d59d8919708aebdb41b Mon Sep 17 00:00:00 2001 From: ling Date: Mon, 21 Sep 2020 11:36:11 +0800 Subject: [PATCH] [MSLITE] onnx deconv convertor bug --- .../legacy_optimizer/graph/weight_format_hardcode_pass.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc b/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc index 44b33c6226..38c5d19579 100644 --- a/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc +++ b/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc @@ -118,7 +118,7 @@ STATUS WeightFormatHardCodePass::HardCodeONNX(const std::unique_ptr &nod } else if (opType == PrimitiveType_DepthwiseConv2D) { weightTensor->format = schema::Format::Format_CHWK; } else if (opType == PrimitiveType_DeConv2D) { - weightTensor->format = schema::Format::Format_CKHW; + weightTensor->format = schema::Format::Format_KCHW; } else { MS_LOG(ERROR) << "Unsupported opType: " << EnumNamePrimitiveType(opType) << ", node: " << node->name; return RET_ERROR; @@ -133,7 +133,7 @@ STATUS WeightFormatHardCodePass::HardCodeONNX(const std::unique_ptr &nod if (opType == PrimitiveType_Conv2D || opType == PrimitiveType_DepthwiseConv2D) { weightTensor->format = schema::Format::Format_KCHW; } else if (opType == PrimitiveType_DeConv2D) { - weightTensor->format = schema::Format::Format_CKHW; + weightTensor->format = schema::Format::Format_KCHW; } else { MS_LOG(ERROR) << "Unsupported opType: " << EnumNamePrimitiveType(opType) << ", node: " << node->name; return RET_ERROR;