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

Small Issue/error in the code #47

Open
niklasbubeck opened this issue Sep 17, 2024 · 1 comment
Open

Small Issue/error in the code #47

niklasbubeck opened this issue Sep 17, 2024 · 1 comment

Comments

@niklasbubeck
Copy link

Hi @LTH14!

First of all, thank you for this great work! Love the concept! . To make myself confident with the code I first wanted to train it on tinyImageNet (which only has 200 classes) to get results faster. While doing this I came across the following problem.

In the file mar/models/mar.py line 59:
self.class_emb = nn.Embedding(1000, encoder_embed_dim)

The given argument class_num of the MAR class has no impact on the class embeddings and instead 1000 classes are hardcoded.
I thought a pull request might be overkill, but still wanted to make you aware of this.

Best Niklas

@LTH14
Copy link
Owner

LTH14 commented Sep 17, 2024

Thanks for pointing out this! Since this code is written and tested only on ImageNet, many places might contain hard-coded class number (1000). The one you mentioned won't cause problem (as the class labels are from 0 to 199), but I have fixed it so that it does not throw an error when num_class>1000.

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