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

Question about the training process #9

Open
zhaoxin94 opened this issue Nov 30, 2021 · 1 comment
Open

Question about the training process #9

zhaoxin94 opened this issue Nov 30, 2021 · 1 comment

Comments

@zhaoxin94
Copy link

Thanks very much for sharing your code!

I have a question about the training process of TS-CAM.

During training, you do not use the cls_token to conduct classification, use remaining tokens instead.
In this circumstance, can the first row of the attention weight (the attention for the cls_token) reflect the relative importance of differnt patches for classification accuractly?

Look forward to your rely!
Thanks!

@vasgaowei
Copy link
Owner

Hi, thanks for your attention.
I think the attention for the cls_token can reflect the relative importance of different patches for classification. The reason is that cls_token is updated in every transformer layer, by weighted summation with attention weight. The attention weight is calculated between cls_token and other patch tokens.

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