未验证 提交 0699afb1 编写于 作者: X xiaoxiaohehe001 提交者: GitHub

fix_arg_release24 (#49771)

上级 01c26ab2
......@@ -639,8 +639,12 @@ struct SimpleOpTypeSetTeller : public Teller {
int axis = desc.HasAttr("axis")
? PADDLE_GET_CONST(int64_t, desc.GetAttr("axis"))
: -1;
bool flatten = PADDLE_GET_CONST(bool, desc.GetAttr("flatten"));
int dtype = PADDLE_GET_CONST(int, desc.GetAttr("dtype"));
bool flatten = desc.HasAttr("flatten")
? PADDLE_GET_CONST(bool, desc.GetAttr("flatten"))
: false;
int dtype = desc.HasAttr("dtype")
? PADDLE_GET_CONST(int, desc.GetAttr("dtype"))
: 3;
if (axis == 0 || flatten || dtype != 2) return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册