Skip to content

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

@myshrry

Description

@myshrry

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions