Skip to content
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

Merged
merged 15 commits into from
Apr 15, 2021
Merged

Fix some error message #32169

merged 15 commits into from
Apr 15, 2021

Conversation

Kqnonrime
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

Fix some error message

@paddle-bot-old
Copy link

paddle-bot-old bot commented Apr 9, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

"should be greater than 0."));
PADDLE_ENFORCE_EQ(scale_w > 0, true,
platform::errors::InvalidArgument(
"The scale of interpolate operator are empty."));
Copy link
Contributor

@chenwhql chenwhql Apr 9, 2021

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."));
Copy link
Contributor

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."));
Copy link
Contributor

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."));
Copy link
Contributor

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."));
Copy link
Contributor

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."));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,注意,这里是三个参数

Copy link
Contributor Author

@Kqnonrime Kqnonrime Apr 13, 2021

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."));
Copy link
Contributor

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."));
Copy link
Contributor

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."));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不一一写了,都是一样的问题

@@ -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."));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里建议在后面加上 in 'py_func' operator 做限定

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@tink2123 tink2123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chenwhql chenwhql merged commit f946ba6 into PaddlePaddle:develop Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants