diff --git a/lite/kernels/xpu/pool_compute.cc b/lite/kernels/xpu/pool_compute.cc index 4480e4875cb3317ddeeea7017f4aa825e2afe320..348f5dcf319e52b9ae08f0c1e8e636b3c7d590e6 100644 --- a/lite/kernels/xpu/pool_compute.cc +++ b/lite/kernels/xpu/pool_compute.cc @@ -38,8 +38,7 @@ void Pool2DCompute::Run() { auto& paddings = *param.paddings; auto type = xdnn::MAX_WITHOUT_INDEX; if (param.pooling_type == "avg") { - if (paddings[0] == 0 && paddings[1] == 0 && paddings[2] == 0 && - paddings[3] == 0) { + if (param.exclusive) { type = xdnn::AVG_WITHOUT_PAD; } else { type = xdnn::AVG_WITH_PAD;