!4729 fix caffe prelu secondly

Merge pull request !4729 from zhaodezan/master
This commit is contained in:
mindspore-ci-bot 2020-08-19 14:33:54 +08:00 committed by Gitee
commit 02256e0d9f
4 changed files with 6 additions and 5 deletions

View File

@ -59,7 +59,7 @@ int CaffePReluCPUKernel::Run() {
output_data = reinterpret_cast<float *>(out_tensors_[0]->Data());
auto channels = input->shape();
prelu_param_->negtive_slope_ = reinterpret_cast<float *>(input1->Data());
prelu_param_->channel_num_ = channels.at(1);
prelu_param_->channel_num_ = channels.at(channels.size() - 1);
auto ret = LiteBackendParallelLaunch(CaffePReluRun, this, prelu_param_->op_parameter_.thread_num_);
if (ret != RET_OK) {

View File

@ -27,7 +27,7 @@ void CaffePRelu(float *input, float *output, CaffePReluParameter *prelu_param_,
output[i] = input[i];
} else {
if (!prelu_param_->channeShared) {
int temp = i / (prelu_param_->input_num_ / prelu_param_->channel_num_);
int temp = i % prelu_param_->channel_num_;
output[i] = input[i] * prelu_param_->negtive_slope_[temp];
} else {
output[i] = input[i] * prelu_param_->negtive_slope_[0];

View File

@ -16,7 +16,7 @@ tracking
mtk_isface
mtk_landmark
mtk_pose_tuku
mtk_face_recognition_v1
#mtk_face_recognition_v1
#mtk_2012_ATLANTA_10class_20190614_v4.1
mtk_detect-deeper-halfdeeper-mbv1-lastearlySSD-shortcut-400-400_nopostprocess_simplified
detect-deeper-halfdeeper-mbv1-shortcut-400-400_nopostprocess_simplified
@ -34,7 +34,7 @@ ml_hardware_pose
ml_bank_recog
2012_ATLANTA_10class_20190131_v4.0
mnet
recognition
#recognition
ml_face_landmark
model_hebing_3branch
detect-mbv1-shortcut-400-400_nopostprocess_simplified

View File

@ -28,7 +28,8 @@ static const std::vector<schema::PrimitiveType> nhwcOpList = {
schema::PrimitiveType_Conv2D, schema::PrimitiveType_DeConv2D,
schema::PrimitiveType_DepthwiseConv2D, schema::PrimitiveType_DeDepthwiseConv2D,
schema::PrimitiveType_Pooling, schema::PrimitiveType_Resize,
schema::PrimitiveType_BatchNorm, schema::PrimitiveType_FusedBatchNorm};
schema::PrimitiveType_BatchNorm, schema::PrimitiveType_FusedBatchNorm,
schema::PrimitiveType_CaffePReLU};
static const std::vector<schema::PrimitiveType> fp32FullOpList = {
schema::PrimitiveType_Concat, schema::PrimitiveType_Add,