Closed Wonder1905 closed 3 years ago
@BattashB I don't understand it either
I don't understand it either
I have the same question
@BattashB I think this should be just a small mistake, the correct comment should be the following,same for the _dot_simililarity function
def _cosine_simililarity(self, x, y):
# x shape: (2N, 1, C)
# y shape: (1, 2N, C)
# v shape: (2N, 2N)
v = self._cosine_similarity(x.unsqueeze(1), y.unsqueeze(0))
return v
Hello guys, that is a general message to say that I have refactored the whole project. I believe the project is much easier to understand now. Please have a look at the new impl and free to submit PR if you find any bugs. Thanks.
Hi , I'm trying to understand the code in : loss/nt_xent.py
we are sending "representations" on both arguments
But when receiving it in cosine_similarity func somehow the sizes are: (N, 1, C) and y shape: (1, 2N, C), how can it be double if you sent the same argument
Thanks for your help.