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

多标签 weight loss 的疑惑 #2951

Closed
thsno02 opened this issue Sep 4, 2023 · 2 comments
Closed

多标签 weight loss 的疑惑 #2951

thsno02 opened this issue Sep 4, 2023 · 2 comments

Comments

@thsno02
Copy link
Contributor

thsno02 commented Sep 4, 2023

Rethinking of Pedestrian Attribute Recognition: Realistic Datasets with Efficient Method 这篇论文中提到了三种 weight loss 的方法,

image

实验结果如下:

image

PaddleClas 在多标签中仅包含了

def ratio2weight(targets, ratio):
pos_weights = targets * (1. - ratio)
neg_weights = (1. - targets) * ratio
weights = paddle.exp(neg_weights + pos_weights)
# for RAP dataloader, targets element may be 2, with or without smooth, some element must great than 1
weights = weights - weights * (targets > 1)
return weights
WF1 这一种,请问这里是有什么考量吗?比如基于实验,WF2 和 WF3 的表现不如 WF1?还是说目前没有官方支持?

REF: https://arxiv.org/abs/2107.03576

@thsno02
Copy link
Contributor Author

thsno02 commented Sep 5, 2023

对多标签感兴趣的朋友可以试试这两个 weight function,在我的任务上,有显著提升。

@cuicheng01
Copy link
Collaborator

@thsno02 目前没有支持,欢迎提PR给PaddleClas~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants