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

why the loss functions have a dot_loss? #11

Closed
Andrewymd opened this issue Jul 3, 2018 · 5 comments
Closed

why the loss functions have a dot_loss? #11

Andrewymd opened this issue Jul 3, 2018 · 5 comments

Comments

@Andrewymd
Copy link

i have see the paper,the loss is estimation by weighted maximum likelihood.
i can't understand the additional dot_loss in the implement.
in the paper
image
Corresponding to it is exp_loss
but in the code, the total loss = exp_loss +dot_loss

@caozhangjie
Copy link
Collaborator

caozhangjie commented Jul 3, 2018 via email

@Andrewymd
Copy link
Author

Thank you

@xiaodongww
Copy link

@caozhangjie There is also one question about the loss function implemented on Pytorch platform.
I am a little confused about the function of parameter "l_threshold".
I used to think that "l_threshold" is used to decide whether an image pair will be penalized. For example, if the distance between two similar (dissimilar) image pairs is smaller (larger) than a threshold value, then we will not calculate its loss.

But recently, I find that the "l_threshold" parameter does not work at all using the default parameter settings in the training script.

mask_dot = dot_product.data > l_threshold

I think variable "mask_dot" will be a matrice of all zeros because "sigmoid_param" is set to be "10./config["hash_bit"]" and "l_threshold" is set to be 15. The maximum value of "dot_product" will be smaller than 10 and thus "mask_dot" will be all zeros. In this way, dot_loss will never be used.

Can you explain the function of 'l_threshold'? And why is it set to be 15?

Thanks in advance.

@caozhangjie
Copy link
Collaborator

caozhangjie commented Aug 25, 2018 via email

@xiaodongww
Copy link

Thank you very much. I got that.

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

3 participants