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

reduce_mean grad error if keepdim=True and reduce_all=True #26614

Merged
merged 1 commit into from
Aug 25, 2020

Conversation

zhupengyang
Copy link
Contributor

@zhupengyang zhupengyang commented Aug 24, 2020

PR types

Bug fixes

PR changes

OPs

Describe

  • eigen Tensor(y, dy) should be flattened to 1D if reduce_all=True
  • If keepdim=True and reduce_all=True, reduce_mean grad compute is crashed because y&dy is N-D but not flattened to 1-D.

@paddle-bot-old
Copy link

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

Copy link
Contributor

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@qjing666 qjing666 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhupengyang zhupengyang merged commit c80fcf9 into PaddlePaddle:develop Aug 25, 2020
@zhupengyang zhupengyang deleted the mean-bug branch August 25, 2020 02:29
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.

3 participants