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

Confusing cls_token handling in ViTTransfomer::forward #3824

Open
syboomsy opened this issue Dec 4, 2024 · 0 comments
Open

Confusing cls_token handling in ViTTransfomer::forward #3824

syboomsy opened this issue Dec 4, 2024 · 0 comments

Comments

@syboomsy
Copy link

syboomsy commented Dec 4, 2024

image

I am quite confused when reading the code of forwarding function.
At line 421, why remove the class token given self.with_cls_token is True?
If it is correct, then at line 412, why remove the class token, given self.with_cls_token is False?
For the same flag var with_cls_token , decoder logic contradicts with encoder logic, could anyone explain this?

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