-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Accuracy diff No.42、118] Fix accuracy diff for paddle.nn.functional.embedding API #73445
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
base: develop
Are you sure you want to change the base?
[Accuracy diff No.42、118] Fix accuracy diff for paddle.nn.functional.embedding API #73445
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
/re-run all-failed |
… accuracy_embedding
c49ca5f
to
91df9aa
Compare
91df9aa
to
7bfabbb
Compare
/re-run all-failed |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #73445 +/- ##
===========================================
Coverage ? 100.00%
===========================================
Files ? 1
Lines ? 5
Branches ? 0
===========================================
Hits ? 5
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/re-run all-failed |
PR Category
Execute Infrastructure
PR Types
Improvements
Description
Pytorch 中 padding_idx 并不会导致前向输出为 0,会保持为原来的 weight,只是反向不会贡献对应 weight 的梯度,所以前向 kernel 不需要考虑 padding_idx 的值
https://docs.pytorch.org/docs/stable/generated/torch.nn.functional.embedding.html
https://github.com/pytorch/pytorch/blob/6959b5febe090375e261e678902681533d2e2528/aten/src/ATen/native/Embedding.cpp#L37-L55
PaddleAPITest 测试通过

TODO