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

About the attention calculation in FASA #14

Open
csguoh opened this issue Oct 1, 2023 · 4 comments
Open

About the attention calculation in FASA #14

csguoh opened this issue Oct 1, 2023 · 4 comments

Comments

@csguoh
Copy link

csguoh commented Oct 1, 2023

Hi, authors.
This work does inspire me a lot! I have a question about the Frequency domain-based self-attention solver
In this line, it seems that you directly use element-wise multiplication, however in classic attention, Matul (or @) is used.
I can not find any explanation in the paper, so could you give me some insight about this? thanks:D

@ccyppl
Copy link

ccyppl commented Oct 10, 2023

你好,作者们。
对于这里并没有使用矩阵乘法而是对应元素相乘。
我也对此问题感到困惑,期望得到解答,谢谢。

@HanzhouLiu
Copy link

I guess the reason why the authors did the element-wise product is that multiplication in frequency domain is equivalent to conv in space domain.

@haodongzhang0118
Copy link

But from the code, when the authors do the element-wise multiplication in this line, they have already come back to the spatial domain because of this line I think. The calculation is not in the frequency domain.

@HanzhouLiu
Copy link

Just my opinion,
out = self.norm(out) # calculate the score matrix
output = v * out # multiply the v matrix by the score matrix

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

4 participants