-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
fix zero bug of case18: paddle.logsumexp #51034
fix zero bug of case18: paddle.logsumexp #51034
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@chenxiao120660 可以报名参加下黑客松赛题:#50630 (comment) |
好的,我们已经报名了序号为31的题目 |
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
hi, @chenxiao120660
|
好的我已经发送了 |
PR types
Bug fixes
PR changes
Others
Describe
paddle.logsumexp
在如下代码会报错:import paddle import numpy as np array = np.array([], dtype=np.float32) x = paddle.to_tensor(np.reshape(array, [0] * 3), dtype='float32') paddle.logsumexp(x, axis=0)
原因:问题在于没有对输入进行检查, 输入的size不能为0
解决方案: 在c++代码中添加检查,并增加相应的单测代码.
#49927
#49919