-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
add pad test #35371
add pad test #35371
Conversation
Thanks for your contribution! |
PADDLE_ENFORCE_GE( | ||
nbDims, 2, | ||
platform::errors::InvalidArgument( | ||
"Input X[0]'s dimension should greater than or equal to 2. " | ||
"But received %d.", | ||
nbDims)); | ||
std::cout << "nbDims:" << nbDims << std::endl; | ||
PADDLE_ENFORCE_EQ( | ||
nbDims * 2, pad_size, | ||
platform::errors::InvalidArgument("Input X[0]'s dimension(nbDims for " | ||
"short) should meet the condition:" | ||
"(nbDims + 1) * 2 == pad_size. But " | ||
"received nbDims:%d, pad_size:%d.", | ||
nbDims, pad_size)); |
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.
这里用return false的方式回退到原生,而非通过PADDLE_ENFORCE报错挂掉吧
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.
LGTM
PR types
Bug fixes
PR changes
OPs
Describe
add pad test