-
Notifications
You must be signed in to change notification settings - Fork 40
Negative sampling #21
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
Comments
The in-batch negatives simply use samples from the same batch: Line 91 in 97cc43e
The pre-batch negatives use cached negatives from previous batches: Lines 117 to 133 in 97cc43e
The self-negatives use the head entities of each example: Lines 104 to 109 in 97cc43e
|
Thank you for your detailed answer. Is all the parameters used in the self-negative sampling method fixed? If I want to use this method in other frameworks, do the parameters used here also have to be? |
Not sure what you are referring to... Self-negative sampling does not add any new parameters. |
May I know why you set -1e4 for masked_fill? |
Any number that is small enough should be able to mask the probability to 0. |
I want to ask a very simple but important question for me, that is, as a novice, I can't accurately find the three negative sampling parts in the code. Can you help me point out? I need this answer very much. I would be very excited if you can give me an answer
The text was updated successfully, but these errors were encountered: