提交 78a44bcd 编写于 作者: G gongdaguo

add modlues and converter bug repair

上级 0f4e6d73
......@@ -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>>(primitiveT_value));
auto primc = utils::cast<std::shared_ptr<mindspore::lite::Conv2D>>(primitiveT_value);
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>>(primitiveT_value));
auto primc = utils::cast<std::shared_ptr<mindspore::lite::DepthwiseConv2D>>(primitiveT_value);
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 ";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册