Skip to content
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

F.cosine_similarity #9

Open
jellyroger opened this issue Jun 15, 2022 · 0 comments
Open

F.cosine_similarity #9

jellyroger opened this issue Jun 15, 2022 · 0 comments

Comments

@jellyroger
Copy link

---> 12 sim = F.cosine_similarity(y_pred.unsqueeze(1), y_pred.unsqueeze(0), dim=-1)
13
14 # 将相似度矩阵对角线置为很小的值, 消除自身的影响

RuntimeError: cosine_similarity requires both inputs to have the same sizes, but x1 has [64, 1, 768] and x2 has [1, 64, 768]

请教一下这里有什么问题吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant