Hi ptrblck,
I didn’t know that, thanks!
model = models.resnet50(pretrained=True)
for param in model.parameters():
param.requires_grad = False
model.classifier = nn.Sequential(nn.Linear(2048, 1024),
nn.ReLU(),
nn.Linear(1024, 102),
nn.LogSoftmax(dim=1))
criterion = nn.NLLLoss()
optimizer = optim.Adam(model.classifier.parameters(), lr=0.003)
model.to(device)