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

Unused nn.Linear in classification model and paper inaccuracy? #8

Open
Snonky opened this issue Sep 28, 2024 · 2 comments
Open

Unused nn.Linear in classification model and paper inaccuracy? #8

Snonky opened this issue Sep 28, 2024 · 2 comments

Comments

@Snonky
Copy link

Snonky commented Sep 28, 2024

Hi, great work, thank you!

I found an orphaned nn.Linear module that was presumably replaced by the PatchEmbed layer in the classification model. I believe this line should be removed.

self.input_layer = nn.Linear(args.patch_size, args.emb_dim)

Slightly related: in section 3.3 of the paper it is stated that P𝑖 → P'𝑖 ∈ ℝC⨯𝑝' with C being the number of channels. As far as I understand 𝑝' is the embedding size (--emb_dim in the code) and that is used to embed all dimensions into one so it should be P'𝑖 ∈ ℝ𝑝' dropping the channel dimension. I apologize if I missed something here that proves my remark as wrong.

@luojike2333
Copy link

Good question!
Have you tried conducting experiments to explore the differences between using nn.Linear and not using it?
Whether there is a difference in the results of the experiment?

@luojike2333
Copy link

Good question!
Have you tried conducting experiments to explore the differences between using nn.Linear and not using it?
Whether there is a difference in the results of the experiment?

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