# Freeze all parameters manually
for param in model.parameters():
    param.requires_grad = False

Replace the last layer with a linear layer. New layers have  requires_grad = True .
model.fc = nn.Linear(num_features, n_classes)

If that doesn’t work restart your kernel. Your unfrozen model might be cached.
Also you need to make sure to run this function before passing your model to the GPU, not after.