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

Maxvit local global #19

Open
easy2star opened this issue Oct 28, 2023 · 0 comments
Open

Maxvit local global #19

easy2star opened this issue Oct 28, 2023 · 0 comments

Comments

@easy2star
Copy link

为什么计算局部注意力时,需要把特征图变换成 (H/P × W/P, P², C) 这个形状,即将P²放在倒数第二个维度?

而计算全局注意力时,则需要把特征图变换成 (G², H/G × W/G, C) 这个形状,然后再交换 【倒数第二个维度】 和 【倒数第三个维度】 的顺序,即变成 (H/G × W/G, G², C),既然这种形式和局部形式相同,为什么不直接进行相同的变换呢,而是再去额外的交换维度?

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