!6119 [MSLITE] Fix bug of anf importer to support MS model converter.

Merge pull request !6119 from wangshaocong/lite_ms
pull/6119/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit f16c01460f

@ -80,7 +80,7 @@ int Pooling::UnPackAttr(const Primitive &prim, const std::vector<AnfNodePtr> &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;
}

@ -375,7 +375,7 @@ std::shared_ptr<PrimitiveC> PrimitiveC::Create(const Primitive &prim, const std:
return NewPrimitiveC<MatMul>(prim, inputs, quantType);
} else if (op_type == "Mul") {
return NewPrimitiveC<Mul>(prim, inputs, quantType);
} else if (op_type == "MaxPool") {
} else if (op_type == "MaxPool" || op_type == "AvgPool") {
return NewPrimitiveC<Pooling>(prim, inputs, quantType);
} else if (op_type == "Quant") {
return NewPrimitiveC<Quant>(prim, inputs, quantType);
@ -397,6 +397,9 @@ std::shared_ptr<PrimitiveC> PrimitiveC::Create(const Primitive &prim, const std:
return NewPrimitiveC<TupleGetItem>(prim, inputs, quantType);
} else if (op_type == "Softmax") {
return NewPrimitiveC<SoftMax>(prim, inputs, quantType);
} else if (op_type == "StridedSlice") {
return NewPrimitiveC<StridedSlice>(prim, inputs, quantType);
#ifdef SUPPORT_TRAIN
} else if (op_type == "SoftmaxCrossEntropyWithLogits") {

Loading…
Cancel
Save