-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
说明补充的单测并没有进入 if 条件里面 |
if 0 in logits.shape: | ||
raise ValueError("The dims of Input(X) should be greater than 0.") |
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.
你好,这个判断还是加到C++kernel里吧。原则是:能在C++里加的检查不在python加。否则影响动态图API性能
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.
ok,我改一下
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.
好的 |
PR types
Bug fixes
PR changes
APIs
Describe
#49919(comment)