Closed jc-ryan closed 3 years ago
Thanks for your reply, but the margin loss always takes loss1 as the loss of correct one, how about the condition when the candidate_2 is correct ?
Hello, if you check the data_reader.py file, you'll see that data is always read in a way that the first candidate is the correct one. When the second one is correct, they are simply swapped.
Hello, thank you for your interest. Train data, too, is processed in a way so that the first candidate is always the correct one. Note that the model is agnostic to the fact whether a candidate is the first or the second candidate, it simply assigns the current candidate a score without access to the other candidate (or the knowledge whether it's dealing with the first or the second candidate). The order in which the candidates are processed thus does not make any difference.
Hope that answers your question!
Originally posted by @vid-koci in https://github.com/vid-koci/bert-commonsense/issues/3#issuecomment-799326718