提交 e414f352 编写于 作者: B baolei.an

[LITE][BM] fix pool adaptive has_attri judge

上级 88d7b311
...@@ -64,7 +64,10 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) { ...@@ -64,7 +64,10 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto strides = op_info->GetAttr<std::vector<int>>("strides"); auto strides = op_info->GetAttr<std::vector<int>>("strides");
auto global_pooling = op_info->GetAttr<bool>("global_pooling"); auto global_pooling = op_info->GetAttr<bool>("global_pooling");
auto ceil_mode = op_info->GetAttr<bool>("ceil_mode"); auto ceil_mode = op_info->GetAttr<bool>("ceil_mode");
auto adaptive = op_info->GetAttr<bool>("adaptive"); bool adaptive = false;
if (op_info->HasAttr("adaptive")) {
adaptive = op_info->GetAttr<bool>("adaptive");
}
bool average_exclusive = false; bool average_exclusive = false;
if (pooling_type == "avg") { if (pooling_type == "avg") {
average_exclusive = op_info->GetAttr<bool>("exclusive"); average_exclusive = op_info->GetAttr<bool>("exclusive");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册