| @@ -144,7 +144,7 @@ const AnfNodePtr ConvBiasaddFusion::Process(const FuncGraphPtr &func_graph, cons | |||||
| MS_ASSERT(primitiveT_value); | MS_ASSERT(primitiveT_value); | ||||
| auto type = primitiveT_value->GetPrimitiveT()->value.type; | auto type = primitiveT_value->GetPrimitiveT()->value.type; | ||||
| if (type == schema::PrimitiveType_Conv2D) { | if (type == schema::PrimitiveType_Conv2D) { | ||||
| primitiveT_value->GetPrimitiveT()->value.AsConv2D()->hasBias = true;; | |||||
| primitiveT_value->GetPrimitiveT()->value.AsConv2D()->hasBias = true; | |||||
| } else if (type == schema::PrimitiveType_DepthwiseConv2D) { | } else if (type == schema::PrimitiveType_DepthwiseConv2D) { | ||||
| primitiveT_value->GetPrimitiveT()->value.AsDepthwiseConv2D()->hasBias = true; | primitiveT_value->GetPrimitiveT()->value.AsDepthwiseConv2D()->hasBias = true; | ||||
| } else if (type == schema::PrimitiveType_DeConv2D) { | } else if (type == schema::PrimitiveType_DeConv2D) { | ||||
| @@ -85,7 +85,7 @@ kernel::LiteKernel *CpuConcatInt32KernelCreator(const std::vector<lite::tensor:: | |||||
| kernel::LiteKernel *CpuConcatFp32KernelCreator(const std::vector<lite::tensor::Tensor *> &inputs, | kernel::LiteKernel *CpuConcatFp32KernelCreator(const std::vector<lite::tensor::Tensor *> &inputs, | ||||
| const std::vector<lite::tensor::Tensor *> &outputs, | const std::vector<lite::tensor::Tensor *> &outputs, | ||||
| OpParameter *opParameter, const Context *ctx, | OpParameter *opParameter, const Context *ctx, | ||||
| const kernel::KernelKey &desc) {; | |||||
| const kernel::KernelKey &desc) { | |||||
| if (opParameter == nullptr) { | if (opParameter == nullptr) { | ||||
| MS_LOG(ERROR) << "Input opParameter is nullptr!"; | MS_LOG(ERROR) << "Input opParameter is nullptr!"; | ||||
| return nullptr; | return nullptr; | ||||
| @@ -81,9 +81,7 @@ void AvgPooling(const float *input_ptr, float *output_ptr, PoolingParameter *poo | |||||
| } // win_w loop | } // win_w loop | ||||
| } // win_h loop | } // win_h loop | ||||
| #ifdef ENABLE_NEON | #ifdef ENABLE_NEON | ||||
| float reverse_count = 1 / real_count; | |||||
| float32x4_t dup_count = vdupq_n_f32(reverse_count); | |||||
| vst1q_f32(output_ptr + out_channel_offset, vmulq_f32(tmp_avg, dup_count)); | |||||
| vst1q_f32(output_ptr + out_channel_offset, tmp_avg / vdupq_n_f32(real_count)); | |||||
| #else | #else | ||||
| *(output_ptr + out_channel_offset) = tmp_avg1 / (float)real_count; | *(output_ptr + out_channel_offset) = tmp_avg1 / (float)real_count; | ||||
| *(output_ptr + out_channel_offset + 1) = tmp_avg2 / (float)real_count; | *(output_ptr + out_channel_offset + 1) = tmp_avg2 / (float)real_count; | ||||
| @@ -208,4 +206,3 @@ void MaxPooling(const float *input_ptr, float *output_ptr, PoolingParameter *poo | |||||
| } // out_plane loop | } // out_plane loop | ||||
| } // out_batch loop | } // out_batch loop | ||||
| } | } | ||||