[0-size Tensor Job2 No.66] Add 0-size Tensor support for paddle.nn.functional.softmax_with_cross_entropy[fluid_ops]#73880
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
|
/re-run all-failed |
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (30.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #73880 +/- ##
==========================================
Coverage ? 30.00%
==========================================
Files ? 2
Lines ? 10
Branches ? 0
==========================================
Hits ? 3
Misses ? 7
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/re-run all-failed |
2 similar comments
|
/re-run all-failed |
|
/re-run all-failed |
|
/re-run all-failed |
1 similar comment
|
/re-run all-failed |
|
@DanielSun11 CI已完成需要review |
PR Category
Operator Mechanism
PR Types
Bug fixes
Description
66 paddle.nn.functional.softmax_with_cross_entropy
soft_label 为False时,axis 所在列不能为0,其他列相同,所以 softmax, loss的numel 都为0,这里判断softmax 的numel为0

https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softmax_with_cross_entropy_cn.html#softmax-with-cross-entropy
PaddleAPITest 测试通过,错误为numpy error

55 paddle.nn.functional.cross_entropy - part

soft_label 为True时,loss维度中axis所在列设置为1,返回填充0
其中,在python端,如果reduction为mean,返回填充需要修改为nan,因为需要调试性能问题,这部分没有修改,在其他PR再修改
PaddleAPITest 测试通过,错误为numpy error