Question 1: Single choice
mediumAI-checkedTransfer LearningFollowing d2l, you build finetune_net from a pretrained ResNet-18, replace its output layer, and
then try to freeze the pretrained layers:
finetune_net = torchvision.models.resnet18(weights="IMAGENET1K_V1")
finetune_net.fc = nn.Linear(finetune_net.fc.in_features, 2)
for param in finetune_net.parameters():
param.requires_grad = False
You meant to train only the new output layer. What happens when training starts?