-
Notifications
You must be signed in to change notification settings - Fork 19
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
想请教一下损失函数的计算问题 #3
Comments
您好,这是因为我们同时也用了batch内的其他样本做了similarity calculation,所以如果您查看代码会发现在 Line 31 in 57acbc3
我们做了一个矩阵相乘,所以这会导致我们的对应label实际上是在这个矩阵的diagonal上。 另外希望下次用英文提问,这样其他研究者遇到同样的问题就可以直接查看issue曾经的问题了。 |
非常感谢您的回答,接受您的建议,以后会用英文提问。 |
Why to do a matrix multiplication here, rather than do like MoCo? |
We found it's better to avoid collapsing. |
您好,我在查看代码的时候,发现和moco相比,损失函数计算的label从全零变成了代码中的torch.arange,请问这样做是什么含义呢,期待您的解答。
labels = torch.arange(choose_match, choose_match + cur_batch_size, dtype=torch.long).cuda()
The text was updated successfully, but these errors were encountered: