diff --git a/lite/kernels/bm/bridges/pool_op.cc b/lite/kernels/bm/bridges/pool_op.cc index fefc85b48c3b4f986832d311f0bb158c97cb0b7a..81ef9224cd25ece246f0c7b7b64920e3ce606b99 100644 --- a/lite/kernels/bm/bridges/pool_op.cc +++ b/lite/kernels/bm/bridges/pool_op.cc @@ -64,7 +64,10 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto strides = op_info->GetAttr>("strides"); auto global_pooling = op_info->GetAttr("global_pooling"); auto ceil_mode = op_info->GetAttr("ceil_mode"); - auto adaptive = op_info->GetAttr("adaptive"); + bool adaptive = false; + if (op_info->HasAttr("adaptive")) { + adaptive = op_info->GetAttr("adaptive"); + } bool average_exclusive = false; if (pooling_type == "avg") { average_exclusive = op_info->GetAttr("exclusive");