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

Qs about your code compared with the orignal code. #15

Open
elk-april opened this issue Apr 30, 2021 · 0 comments
Open

Qs about your code compared with the orignal code. #15

elk-april opened this issue Apr 30, 2021 · 0 comments

Comments

@elk-april
Copy link

elk-april commented Apr 30, 2021

Hi, I noticed that it:
your code:

x = self.positional_embedding(x)  # b,gh*gw+1,d 
x = self.transformer(x)  # b,gh*gw+1,d

Vision Transformer(from https://github.com/lucidrains/vit-pytorch/blob/main/vit_pytorch/vit.py):

x += self.pos_embedding[:, :(n + 1)]
x = self.dropout(x)
x = self.transformer(x)

Actually, there are two differences:

  1. you don't use the dropout after positional_embedding
  2. the original positional_embedding is not used in the classification token

Could you please tell me the reasons for these changes?
Looking forward to your reply, thanks very much.

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