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

余弦相似度问题? #24

Open
weihang-luo opened this issue Dec 3, 2023 · 1 comment
Open

余弦相似度问题? #24

weihang-luo opened this issue Dec 3, 2023 · 1 comment

Comments

@weihang-luo
Copy link

weihang-luo commented Dec 3, 2023

https://github.com/edward3862/LoFGAN-pytorch/blob/4ad8b4dd4ec8f8795e044b2c58f507af898d580d/networks/lofgan.py#L292C17-L292C17

fx = torch.matmul(w_feat_select, w_ref) # (321264)

这里实在求余弦相似度吗? 只求了内积?

@edward3862
Copy link
Owner

Sorry for the late reply. w_feat_select and w_ref are normalized embeddings, so we are calculating cosine similarity.

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

2 participants