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

2022 assignment3 Self_Supervised_Learning.ipynb Baseline: Without Self-Supervised Learning #285

Open
myshrry opened this issue Sep 11, 2022 · 0 comments

Comments

@myshrry
Copy link

myshrry commented Sep 11, 2022

The instruction under Baseline: Without Self-Supervised Learning said clearly "all weights in the model are trained", but I found something confusing in the corresponding code as follow,

model = Classifier(num_class=len(train_data.classes)).to(device)
for param in model.f.parameters():
    param.requires_grad = False

and

optimizer = optim.Adam(model.fc.parameters(), lr=1e-3, weight_decay=1e-6)

It's obvious that only the weights of the final fc layer are trained, isn't it?

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