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

[Broadcast]Fix empty broadcast #50064

Closed
wants to merge 10 commits into from

Conversation

AndPuQing
Copy link
Contributor

@AndPuQing AndPuQing commented Jan 29, 2023

PR types

Bug fixes

PR changes

APIs

Describe

该 PR 修复了空张量 broadcast 时产生的非预期输出。例如:

# before
>>> import paddle
>>> print(paddle.broadcast_shape([0], [0, 1]))
[-1, -1]

# after
>>> import paddle
>>> print(paddle.broadcast_shape([0], [0, 1]))
[0, 0]

在结果上与numpy的结果保持一致

Relevant

#49925 Case7: paddle.distribution.StickBreakingTransform

#49927

Signed-off-by: PuQing <me@puqing.work>
Signed-off-by: PuQing <me@puqing.work>
Signed-off-by: PuQing <me@puqing.work>
Signed-off-by: PuQing <me@puqing.work>
@paddle-bot
Copy link

paddle-bot bot commented Jan 29, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Signed-off-by: PuQing <me@puqing.work>
Signed-off-by: PuQing <me@puqing.work>
Signed-off-by: PuQing <me@puqing.work>
Signed-off-by: PuQing <me@puqing.work>
@luotao1
Copy link
Contributor

luotao1 commented Mar 22, 2023

在 develop 上已经无法复现

@luotao1 luotao1 closed this Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants