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

I want to know what the distance metric of features you use #24

Open
BiaoBiaoLi opened this issue Aug 30, 2020 · 1 comment
Open

I want to know what the distance metric of features you use #24

BiaoBiaoLi opened this issue Aug 30, 2020 · 1 comment

Comments

@BiaoBiaoLi
Copy link

Hi WangYue:
Thanks your work,I want ask a question:
scores = torch.matmul(src_embedding.transpose(2, 1).contiguous(), tgt_embedding) / math.sqrt(d_k)
scores = torch.softmax(scores, dim=2)
I want to know what the distance metric of features you use,I think it's like the Attention(Q; K; V ) = softmax(QK' /sqrt(pdk) )V in Attention Is All You Need.

@LinyeLi60
Copy link

I think it is cosine distance.

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