Skip to content

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

Merged
zhupengyang merged 1 commit intoPaddlePaddle:developfrom
zhupengyang:mean-bug
Aug 25, 2020
Merged

reduce_mean grad error if keepdim=True and reduce_all=True#26614
zhupengyang merged 1 commit intoPaddlePaddle:developfrom
zhupengyang:mean-bug

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