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

loss is too small #19

Open
valencebond opened this issue May 17, 2019 · 1 comment
Open

loss is too small #19

valencebond opened this issue May 17, 2019 · 1 comment

Comments

@valencebond
Copy link

the code weights[inds] = tot / num_in_bin
loss = F.binary_cross_entropy_with_logits( input, target, weights, reduction='sum') / tot
same as weights[inds] = 1 / num_in_bin , and combination with weights = weights / n
weighted logits may be one percent or one thousandths of origin weighted if there are many samples in one bins。
if there is something wrong with my understanding , please tell me.

@libuyu
Copy link
Owner

libuyu commented May 20, 2019

Your understanding is right, and our target is just making the weight of these samples small. The motivation and details can be seen in our paper https://arxiv.org/abs/1811.05181

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

No branches or pull requests

2 participants