In PyTorch, you can easily set requires_grad to False for whatever parameters you don’t want to be updated.
You can do the following:
for name, param in model.named_parameters():
      if name not in "...":
         param.requires_grad = False