Browse Source

!7871 fix conv parser of onnx

Merge pull request !7871 from yankai10/merge_1027
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
af78c12a73
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc

+ 2
- 1
mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc View File

@@ -21,6 +21,7 @@

namespace mindspore {
namespace lite {
constexpr int32_t kSingleGrounp = 1;
bool OnnxConvParser::ParseGroupConvolution(const std::unique_ptr<schema::Conv2DT> &attr, schema::CNodeT *op) {
MS_LOG(DEBUG) << "onnx DepthwiseConvParser";
if (attr == nullptr || attr->group != attr->channelIn) {
@@ -171,7 +172,7 @@ STATUS OnnxConvParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::Nod
attr->activationType = schema::ActivationType_NO_ACTIVATION;
}

if (attr->group == attr->channelOut) {
if (attr->group > kSingleGrounp) {
if (!ParseGroupConvolution(attr, op)) {
MS_LOG(ERROR) << "Convert Convolution to Depthwise failed";
return RET_ERROR;


Loading…
Cancel
Save