diff --git a/mindspore/lite/src/ops/pooling.cc b/mindspore/lite/src/ops/pooling.cc index 5c94a6cd7f..8e0ef06da6 100644 --- a/mindspore/lite/src/ops/pooling.cc +++ b/mindspore/lite/src/ops/pooling.cc @@ -80,7 +80,7 @@ int Pooling::UnPackAttr(const Primitive &prim, const std::vector &in } if (prim.instance_name() == "MaxPool") { attr->poolingMode = schema::PoolMode_MAX_POOLING; - } else if (prim.instance_name() == "MeanPool") { + } else if (prim.instance_name() == "MeanPool" || prim.instance_name() == "AvgPool") { attr->poolingMode = schema::PoolMode_MEAN_POOLING; } diff --git a/mindspore/lite/src/ops/primitive_c.cc b/mindspore/lite/src/ops/primitive_c.cc index 364742ad8c..0e7f624eb8 100644 --- a/mindspore/lite/src/ops/primitive_c.cc +++ b/mindspore/lite/src/ops/primitive_c.cc @@ -375,7 +375,7 @@ std::shared_ptr PrimitiveC::Create(const Primitive &prim, const std: return NewPrimitiveC(prim, inputs, quantType); } else if (op_type == "Mul") { return NewPrimitiveC(prim, inputs, quantType); - } else if (op_type == "MaxPool") { + } else if (op_type == "MaxPool" || op_type == "AvgPool") { return NewPrimitiveC(prim, inputs, quantType); } else if (op_type == "Quant") { return NewPrimitiveC(prim, inputs, quantType); @@ -397,6 +397,9 @@ std::shared_ptr PrimitiveC::Create(const Primitive &prim, const std: return NewPrimitiveC(prim, inputs, quantType); } else if (op_type == "Softmax") { return NewPrimitiveC(prim, inputs, quantType); + } else if (op_type == "StridedSlice") { + return NewPrimitiveC(prim, inputs, quantType); + #ifdef SUPPORT_TRAIN } else if (op_type == "SoftmaxCrossEntropyWithLogits") {