!4992 add modlues and converter bug repair
Merge pull request !4992 from gongdaguo/add_modlues_converter_bug_repair
This commit is contained in:
commit
7795b7cd22
|
@ -56,6 +56,7 @@ nasnet_large.tflite
|
|||
model_emotions_0727_nosoftmax.tflite
|
||||
inception_resnet_v2.tflite
|
||||
ml_ocr_latin.tflite
|
||||
hiai_PoseEstimation_Pcm.tflite
|
||||
hiai_ssd_mobilenetv2_object.tflite
|
||||
hiai_cv_focusShootOCRModel_02.tflite
|
||||
hiai_cv_poseEstimation.tflite
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "schema/inner/model_generated.h"
|
||||
#include "tools/optimizer/common/gllo_utils.h"
|
||||
|
||||
|
||||
namespace mindspore::opt {
|
||||
namespace {
|
||||
constexpr size_t kActivationInputsLength = 2;
|
||||
|
@ -68,14 +67,18 @@ const AnfNodePtr ConvActivationFusion::Process(const FuncGraphPtr &func_graph, c
|
|||
MS_ASSERT(utils::isa<std::shared_ptr<mindspore::lite::Conv2D>>(primitive_c));
|
||||
auto primc = utils::cast<std::shared_ptr<mindspore::lite::Conv2D>>(primitive_c);
|
||||
MS_ASSERT(primc != nullptr);
|
||||
primc->SetActivationType(activation_type);
|
||||
return pre_node;
|
||||
if (primc->GetActivationType() == schema::ActivationType_NO_ACTIVATION) {
|
||||
primc->SetActivationType(activation_type);
|
||||
return pre_node;
|
||||
}
|
||||
} else if (node_type == schema::PrimitiveType_DepthwiseConv2D) {
|
||||
MS_ASSERT(utils::isa<std::shared_ptr<mindspore::lite::DepthwiseConv2D>>(primitive_c));
|
||||
auto primc = utils::cast<std::shared_ptr<mindspore::lite::DepthwiseConv2D>>(primitive_c);
|
||||
MS_ASSERT(primc != nullptr);
|
||||
primc->SetActivationType(activation_type);
|
||||
return pre_node;
|
||||
if (primc->GetActivationType() == schema::ActivationType_NO_ACTIVATION) {
|
||||
primc->SetActivationType(activation_type);
|
||||
return pre_node;
|
||||
}
|
||||
} else {
|
||||
MS_LOG(EXCEPTION) << "conv activation pass match only conv2d or depthwise_conv2d ";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue