|
|
|
@ -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;
|
|
|
|
|