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 using delta_RS #2
Comments
Hi, Thanks for your interest in our work! Basically, Regarding the code snippet you shared; "if" part implements the smoothed step function (please see Fig. 4 and Eq. (21) in https://arxiv.org/pdf/2008.07294.pdf) and the "else" part basically aims to prevent the division-by-zero error when Hope it is more clear now. |
Thanks for your prompt reponse. I have one more question. I think the logit is the input the sigmoid funtion but I wonder if it makes any difference if we use the output of the sigmoid function as input to the ranking loss. |
Yes, you are correct about what I mean by "logit". In fact, I have also thought about using the normalized logits after sigmoid (I will call them "probabilities" considering that they are between [0,1]) but never tried. That's why, I can only make some "rational" guesses:
So, by validating |
Thanks a lot. I will definitely let you know after I get some results. |
Hello
In the file ranking_losses.py, I am a little confused about the following codes.
if delta_RS > 0:
fg_relations=torch.clamp(fg_relations/(2delta_RS)+0.5,min=0,max=1)
bg_relations=torch.clamp(bg_relations/(2delta_RS)+0.5,min=0,max=1)
else:
fg_relations = (fg_relations >= 0).float()
bg_relations = (bg_relations >= 0).float()
I do not quite understand why you used delta_RS and what is the bias number 0.5 used for. It seems to me that when you add 0.5, it will make some negative logits to be positive. Does it make sense?
Thanks
The text was updated successfully, but these errors were encountered: