-
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 seven error message #32397
Merged
Merged
Fix seven error message #32397
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
57ff027
fix two error message
Kqnonrime 3107423
fix two error message
Kqnonrime 8cdb18e
fix error
Kqnonrime 6945965
fix error
Kqnonrime a7c07d1
fix error
Kqnonrime 6526d12
fix error
Kqnonrime 262f683
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
Kqnonrime f7f5682
fix some error message
Kqnonrime d0a5683
fix some error
Kqnonrime fcfa08f
fix error
Kqnonrime 0f16f77
fix some error
Kqnonrime 6b33374
fix some error
Kqnonrime bb18a82
fix some error
Kqnonrime 05d4a42
fix one error
Kqnonrime d67d774
fix some error
Kqnonrime fdb7d9f
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
Kqnonrime 4fdd4ef
fix seven error message
Kqnonrime a012976
fix error
Kqnonrime e4bc062
fix error
Kqnonrime 29cb2db
fix error
Kqnonrime 4e690a0
fix error
Kqnonrime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,10 +50,15 @@ class ScatterNdAddOp : public framework::OperatorWithKernel { | |
PADDLE_ENFORCE_LE( | ||
index_dims[index_dims_size - 1], ref_dims_size, | ||
platform::errors::InvalidArgument( | ||
"Input(Index).shape[-1] should be no greater than Input(X).rank")); | ||
"The last dimension of Input(Index)'s shape should be no greater " | ||
"than the rank of Input(X), but received the last dimension of " | ||
"Input(Index)'s shape is %d, the rank of Input(X) is %d.", | ||
index_dims[index_dims_size - 1], ref_dims_size)); | ||
PADDLE_ENFORCE_GE(index_dims_size, 2UL, | ||
platform::errors::InvalidArgument( | ||
"The rank of Input(Index) should be greater than 1")); | ||
"The rank of Input(Index) should be greater than 1, " | ||
"but received the rank of Input(Index) is %d.", | ||
index_dims_size)); | ||
|
||
// update.shape = index.shape[:-1] + output.shape[index.shape[-1]:] | ||
std::vector<int64_t> r_updates_dims; | ||
|
@@ -66,12 +71,21 @@ class ScatterNdAddOp : public framework::OperatorWithKernel { | |
|
||
PADDLE_ENFORCE_EQ( | ||
r_updates_dims.size(), updates_dims_size, | ||
platform::errors::InvalidArgument("Updates has wrong shape")); | ||
platform::errors::InvalidArgument( | ||
"Updates has wrong shape.The shape of Updates and Input(Updates) " | ||
"should be same, but received the shape of Updates is %d, " | ||
"the shape of Input(Updates) is %d.", | ||
r_updates_dims.size(), updates_dims_size)); | ||
|
||
for (int64_t i = 0; i < updates_dims_size; ++i) { | ||
PADDLE_ENFORCE_EQ( | ||
r_updates_dims[i], updates_dims[i], | ||
platform::errors::InvalidArgument("Updates has wrong shape")); | ||
platform::errors::InvalidArgument( | ||
"Updates has wrong shape.The dimensions of Updates and " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
"Input(Updates) should match, but received Updates's" | ||
"%d-th dimension is %d, Input(Updates)'s %d-th " | ||
"dimension is %d.", | ||
i, r_updates_dims[i], i, updates_dims[i])); | ||
} | ||
ctx->SetOutputDim("Out", ref_dims); | ||
ctx->ShareLoD("X", /*->*/ "Out"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
shape.The
这种建议中间加一个空格