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

found reduplicated shortcut connections for the same attention module #4

Closed
Karbo123 opened this issue Feb 25, 2022 · 2 comments
Closed

Comments

@Karbo123
Copy link

Firstly many thanks to this great work. However, I find something weird in the codes, but I don't know whether it is intentional.

I find that SpatialAttention already has a shortcut connection in its forward function, but I also find another shortcut connection in Block's forward function. I think that the shortcuts are reduplicated twice for the same attention module, it should be better to remove the first residual connection here.

Please point out any possible mistakes in my comments, thanks.

@MenghaoGuo
Copy link
Contributor

Thanks for your attention to our work.

Careful observation.

In fact, it is not a redundancy. In the experimen, we find that it can improve training stability and final result by adding a residual connection. It is also written in experiment section.

image

@Karbo123
Copy link
Author

Thanks for the quick reply. I initially think it is a mistake, but now I know it is written on purpose.
However, I still think that the trick is rather elusive, and hard to understand.

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