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

cross_attn_l2u的计算方式 #14

Closed
kakakaaka opened this issue Jun 23, 2024 · 4 comments
Closed

cross_attn_l2u的计算方式 #14

kakakaaka opened this issue Jun 23, 2024 · 4 comments

Comments

@kakakaaka
Copy link

kakakaaka commented Jun 23, 2024

想问下代码中cross_attn_l2u的计算方式能否更详细的讲解一下. 初步看似乎不是计算通道之间的相似度而是在计算token之间的相似度.不知道我的理解对不对. 如果可以的话是否能够加微信联系一下, 我微信18842363882.

Copy link

Stale issue message

@McGregorWwww
Copy link
Collaborator

你好,抱歉回复的有点晚了,通道相似度的操作主要是通过转置实现的,原本是q (B, N, C) * k^T (B, C, N) 得到 (N, N)的相似性矩阵,通道的话就是q^T (B, C, N) * k (B, N, C) 得到 (C,C)的相似性矩阵,即每个channel的之间的关系,希望有帮助

@kakakaaka
Copy link
Author

感谢, 稍后我再去学习下~.

Copy link

Stale issue message

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

No branches or pull requests

2 participants