Closed
Conversation
1dc8153 to
2d498b1
Compare
pkuyym
reviewed
May 16, 2018
Contributor
pkuyym
left a comment
There was a problem hiding this comment.
Please check https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/fluid/operators/is_empty_op.cc, seems we have such op already.
| @@ -0,0 +1,70 @@ | |||
| /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. | |||
| limitations under the License. */ | ||
|
|
||
| #include "paddle/fluid/operators/has_data_op.h" | ||
| #include <string> |
Contributor
There was a problem hiding this comment.
exchange line15 with line16
| void Make() override { | ||
| // inputs and outputs stored in proto | ||
| AddInput("X", "(LoDTensor) the LoDTensor to check"); | ||
| AddOutput("Out", "(LoDTensor) the ouput of has_data_op"); |
Contributor
There was a problem hiding this comment.
ouput --> output
has_data_op --> HasDataOp
Please add a dot at end of each sentence.
| PADDLE_ENFORCE(ctx->HasOutput("Out"), | ||
| "Output(Out) of HasDataOp should not be null."); | ||
| ctx->SetOutputDim("Out", {1}); | ||
| ctx->ShareLoD("X", "Out"); |
Contributor
There was a problem hiding this comment.
LoD of Out shouldn't inherit from X, in fact, Out has no LoD.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolved #10512