未验证 提交 5d60ff91 编写于 作者: X xiaoxiaohehe001 提交者: GitHub

fix_arg (#49770)

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