-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some error message #32169
Fix some error message #32169
Conversation
Thanks for your contribution! |
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里scale是个系数吧,应该是要求要大于0,empty的描述不太适合这里,还是用类似之前描述吧,比如The input 'scale' Tensor's value in Operator(interpolate) should be greater than 0, but received value is %d.
?
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0 && scale_h > 0, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,但这里是两个值, 这句建议拆成两句检查,便于用户具体定位是哪个值错了
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0 && scale_h > 0, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0 && scale_h > 0 && scale_d, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0 && scale_h > 0 && scale_d, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,注意,这里是三个参数
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你好,这里scale_d我不是很理解,scale_d = scale_data[0],这是一个布尔值吗,我看代码好像应该指深度,这里是不是应该改成scale_d>0,不知道我的理解对不对。
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
"should be greater than 0.")); | ||
PADDLE_ENFORCE_EQ(scale_w > 0 && scale_h > 0, true, | ||
platform::errors::InvalidArgument( | ||
"The scale of interpolate operator are empty.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不一一写了,都是一样的问题
paddle/fluid/operators/py_func_op.cc
Outdated
@@ -180,7 +180,7 @@ class PyFuncOpShapeInference : public framework::InferShapeBase { | |||
void operator()(framework::InferShapeContext *ctx) const override { | |||
PADDLE_ENFORCE_EQ(!ctx->IsRuntime(), true, | |||
platform::errors::InvalidArgument( | |||
"Infer shape cannot be called in runtime.")); | |||
"Shape inference cannot be called at run time.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里建议在后面加上 in 'py_func' operator
做限定
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Describe
Fix some error message