-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Compare Operator #5325
Compare Operator #5325
Conversation
paddle/operators/compare_op.cc
Outdated
}; | ||
|
||
template <typename OpComment> | ||
class LogicalOpInferShape : public framework::InferShapeBase { |
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.
BinaryLogicalOpInferShape
paddle/operators/compare_op.cc
Outdated
namespace paddle { | ||
namespace operators { | ||
template <typename OpComment> | ||
class LogicalOpProtoMaker : public framework::OpProtoAndCheckerMaker { |
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.
Maybe BinaryLogicalOpProtoMaker is more accurate.
7e8ace7
to
f9ef2fb
Compare
PADDLE_ENFORCE(context->HasInput("X"), "%s operator must has input X", | ||
comment.type); | ||
PADDLE_ENFORCE(context->HasInput("Y"), "%s operator must has input Y", | ||
comment.type); |
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.
enforce X and Y to have the same shape.
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
operator
less_than
andequal