Skip to content
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

[BUG FIX] when x.dim < y.dim, the result of compare_op is inverse #32470

Merged
merged 2 commits into from
Apr 25, 2021

Conversation

wawltor
Copy link
Contributor

@wawltor wawltor commented Apr 22, 2021

PR types

Bug fixes

PR changes

OPs

Describe

BUG_FIX: when x.dim < y.dim, the result of compare_op is inverse

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@wawltor wawltor changed the title BUG_FIX: when x.dim < y.dim, the result of compare_op is inverse [BUG Fix] when x.dim < y.dim, the result of compare_op is inverse Apr 23, 2021
@wawltor wawltor changed the title [BUG Fix] when x.dim < y.dim, the result of compare_op is inverse [BUG FIX] when x.dim < y.dim, the result of compare_op is inverse Apr 23, 2021
Copy link
Collaborator

@ZHUI ZHUI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


auto x_dims = x->dims();
auto y_dims = y->dims();
if (x_dims.size() >= y_dims.size()) {
Copy link
Collaborator

@ZHUI ZHUI Apr 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be better approach to fix the problem in broadcast function.

There should be some notes to report the broadcast issues.

@wawltor wawltor merged commit 78eff52 into PaddlePaddle:develop Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants