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

Possible error when using mask for attention. #153

Open
TropComplique opened this issue Jun 5, 2024 · 0 comments
Open

Possible error when using mask for attention. #153

TropComplique opened this issue Jun 5, 2024 · 0 comments

Comments

@TropComplique
Copy link

Hi!
I believe that we must use a mask in window self attention only when we shift windows.
But here

attn_windows = self.attn(x_windows, mask=self.calculate_mask(x_size).to(x.device))

we use the mask all the time, for shifted and non shifted windows.

This might introduce errors at the bottom edge or at the right edge of an image.

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