diff --git a/lite/kernels/mlu/bridges/pool_op.cc b/lite/kernels/mlu/bridges/pool_op.cc index f77c8084c76fc52c39938e723f02bde9b3cac41b..d9c84808dcf6eeed3fe1eee6fdf9e84d8aeee4fc 100644 --- a/lite/kernels/mlu/bridges/pool_op.cc +++ b/lite/kernels/mlu/bridges/pool_op.cc @@ -72,6 +72,13 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) { if (op_info->HasAttr("adaptive")) { adaptive = op_info->GetAttr("adaptive"); } + auto input_dims = x->dims(); + if (global_pooling) { + ksize.resize(static_cast(input_dims.size()) - 2); + for (size_t i = 0; i < ksize.size(); ++i) { + ksize[i] = static_cast(input_dims[i + 2]); + } + } lite::operators::UpdatePadding(&paddings, global_pooling, adaptive, diff --git a/lite/kernels/x86/activation_compute.cc b/lite/kernels/x86/activation_compute.cc index 2910364f37b74d94977e2397e31eb97fd367825e..9b4c2fadd9ce427db272a9bb0cfd0e0a10716f11 100644 --- a/lite/kernels/x86/activation_compute.cc +++ b/lite/kernels/x86/activation_compute.cc @@ -78,3 +78,13 @@ REGISTER_LITE_KERNEL(softsign, .BindInput("X", {LiteType::GetTensorTy(TARGET(kX86))}) .BindOutput("Out", {LiteType::GetTensorTy(TARGET(kX86))}) .Finalize(); + +REGISTER_LITE_KERNEL(sigmoid, + kX86, + kFloat, + kNCHW, + paddle::lite::kernels::x86::SoftsignCompute, + def) + .BindInput("X", {LiteType::GetTensorTy(TARGET(kX86))}) + .BindOutput("Out", {LiteType::GetTensorTy(TARGET(kX86))}) + .Finalize(); diff --git a/lite/kernels/x86/elementwise_compute.cc b/lite/kernels/x86/elementwise_compute.cc index 710e67956b055b84323a23443c671682704dd2c2..3a7787de2d3ebd7381d2feea9d17a955b35c89ae 100644 --- a/lite/kernels/x86/elementwise_compute.cc +++ b/lite/kernels/x86/elementwise_compute.cc @@ -35,3 +35,14 @@ REGISTER_LITE_KERNEL(elementwise_add, .BindInput("Y", {LiteType::GetTensorTy(TARGET(kX86))}) .BindOutput("Out", {LiteType::GetTensorTy(TARGET(kX86))}) .Finalize(); + +REGISTER_LITE_KERNEL(elementwise_mul, + kX86, + kFloat, + kNCHW, + paddle::lite::kernels::x86::ElementwiseAddCompute, + def) + .BindInput("X", {LiteType::GetTensorTy(TARGET(kX86))}) + .BindInput("Y", {LiteType::GetTensorTy(TARGET(kX86))}) + .BindOutput("Out", {LiteType::GetTensorTy(TARGET(kX86))}) + .Finalize();