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

【Hackathon No.31】 Fix divide zero bug for Case 6:paddle.nn.functional.softmax_with_cross_entropy #51697

Closed

Conversation

zeroRains
Copy link
Contributor

PR types

Bug fixes

PR changes

APIs

Describe

#49919(comment)

@paddle-bot
Copy link

paddle-bot bot commented Mar 15, 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.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Mar 15, 2023
@CLAassistant
Copy link

CLAassistant commented Mar 15, 2023

CLA assistant check
All committers have signed the CLA.

@zeroRains
Copy link
Contributor Author

image
我就改了两行,但是只命中一行CI过不了怎么办嘛

@zeroRains zeroRains changed the title fix divide zero bug for softmax_with_cross_entropy 【Hackathon No.31】 Fix divide zero bug for Case 6:paddle.nn.functional.softmax_with_cross_entropy Mar 16, 2023
@luotao1
Copy link
Contributor

luotao1 commented Mar 16, 2023

我就改了两行,但是只命中一行CI过不了怎么办嘛

说明补充的单测并没有进入 if 条件里面

@zeroRains
Copy link
Contributor Author

image
我在本地跑单例的时候是可以覆盖进去的呀

Comment on lines +2341 to +2342
if 0 in logits.shape:
raise ValueError("The dims of Input(X) should be greater than 0.")
Copy link
Contributor

Choose a reason for hiding this comment

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

你好,这个判断还是加到C++kernel里吧。原则是:能在C++里加的检查不在python加。否则影响动态图API性能

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,我改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
额,好像这个不用修了,那我取消PR吧

@luotao1
Copy link
Contributor

luotao1 commented Mar 17, 2023

额,好像这个不用修了,那我取消PR吧

好的

@luotao1 luotao1 closed this Mar 17, 2023
@zeroRains zeroRains deleted the softmax_cross_entropy branch March 17, 2023 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants