-
Notifications
You must be signed in to change notification settings - Fork 5.8k
新增MultiLabelMarginLoss #73538
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
新增MultiLabelMarginLoss #73538
Conversation
modified: python/paddle/nn/__init__.py modified: python/paddle/nn/functional/__init__.py modified: python/paddle/nn/functional/loss.py modified: python/paddle/nn/layer/__init__.py modified: python/paddle/nn/layer/loss.py new file: test/legacy_test/test_multilabelmarginloss.py
你的PR提交成功,感谢你对开源项目的贡献! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #73538 +/- ##
==========================================
Coverage ? 95.74%
==========================================
Files ? 2
Lines ? 47
Branches ? 0
==========================================
Hits ? 45
Misses ? 2
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
modified: test/legacy_test/CMakeLists.txt modified: test/legacy_test/test_multilabelmarginloss.py
docs: PaddlePaddle/docs#7331 |
python/paddle/nn/functional/loss.py
Outdated
sample_loss = paddle.zeros([], dtype=input.dtype) | ||
|
||
# check each position for valid label | ||
for j in range(dim): |
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.
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.
嗯,收到,因为静态图无法用if else,所以修改了很多,那我改成底层的cpp和cuda实现吧
Sorry to inform you that abd1da5's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
modified: python/paddle/nn/functional/loss.py
已修改一版新的函数 |
CI报错: 2025-07-04 08:19:58 /paddle/paddle/phi/kernels/funcs/fft_fill_conj.h(163): error: identifier "ctx" is undefined
2025-07-04 08:19:58 detected during instantiation of "void phi::FFTR2CKernel<T,Context>(const Context &, const phi::DenseTensor &, const std::vector<int64_t, std::allocator<int64_t>> &, const std::__cxx11::string &, __nv_bool, __nv_bool, phi::DenseTensor *) [with T=float, Context=phi::GPUContext]"
2025-07-04 08:19:58 /paddle/paddle/phi/kernels/gpu/fft_kernel.cu(34): here
2025-07-04 08:19:58
2025-07-04 08:19:58 /paddle/paddle/phi/kernels/funcs/fft_fill_conj.h(163): error: type name is not allowed
2025-07-04 08:19:58 detected during instantiation of "void phi::FFTR2CKernel<T,Context>(const Context &, const phi::DenseTensor &, const std::vector<int64_t, std::allocator<int64_t>> &, const std::__cxx11::string &, __nv_bool, __nv_bool, phi::DenseTensor *) [with T=float, Context=phi::GPUContext]"
2025-07-04 08:19:58 /paddle/paddle/phi/kernels/gpu/fft_kernel.cu(34): here 应该和pr修改部分无关 猜测可能和这个pr有关 |
PaConvert: PaddlePaddle/PaConvert#599 |
test/legacy_test/CMakeLists.txt
Outdated
@@ -1247,3 +1247,4 @@ set_tests_properties(test_imperative_selected_rows_to_lod_tensor | |||
PROPERTIES TIMEOUT 200) | |||
set_tests_properties(test_slice_op PROPERTIES TIMEOUT 120) | |||
set_tests_properties(test_load_state_dict_from_url PROPERTIES TIMEOUT 40) | |||
set_tests_properties(test_multimarginloss PROPERTIES TIMEOUT 120) |
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.
目前的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.
嗯,收到,已修改,等CI测试之后再看一下
本地测试时间 Ran 4 tests in 0.192s |
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
PR Category
User Experience
PR Types
Improvements
Description
当前问题
目前paddle没有MultiLabelMarginLoss
解决方案
新增MultiLabelMarginLoss