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 classification head layer #7

Closed
YananGu opened this issue Feb 20, 2023 · 3 comments
Closed

Question about the classification head layer #7

YananGu opened this issue Feb 20, 2023 · 3 comments

Comments

@YananGu
Copy link

YananGu commented Feb 20, 2023

Hi, I am very interested in your work, and your reproduction work contributes a lot to the incremental learning community.

In the process of studying the code, I found that the classification layer is only updated at the first task, and then no longer updated in subsequent tasks, is this normal? Is the official code also set up like this? Look forward to your answer,

@YananGu
Copy link
Author

YananGu commented Feb 20, 2023

Sorry I read it wrong, the classification head layer is updating.

@YananGu YananGu closed this as completed Feb 20, 2023
@prachigarg23
Copy link

Hi @YananGu , can you please point me to where in the code is the classifier layer being initialized and updated?

@YananGu
Copy link
Author

YananGu commented Apr 21, 2023

Hi @prachigarg23, the classifier layer is defined in line 410 of vision_transformer.py.

    self.head = nn.Linear(self.embed_dim, num_classes) if num_classes > 0 else nn.Identity()

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