-
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
bugfix reshape -1 #36087
bugfix reshape -1 #36087
Conversation
✅ This PR's description meets the template requirements! |
Thanks for your contribution! |
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
@@ -229,7 +229,7 @@ class ReshapeOp : public framework::OperatorWithKernel { | |||
// by now we require that if the input tensor is zero shape, the target | |||
// shape of output must be zero | |||
if (in_size == 0) { | |||
PADDLE_ENFORCE_EQ( | |||
PADDLE_ENFORCE_LE( |
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.
上面的注释之后同步改一下
PR types
Bug fixes
PR changes
OPs
Describe
allowing reshape an empty tensor to a shape with "-1"