Note that, if you have subnetworks, you can apply this way only to one of them calling model.subnetwork.named_parameters(). The way I present the solution if the most general one.
For example this is another solution (equivalent), proposed by ptrblck
optim.SGD([{'params': [param for name, param in model.named_parameters() if 'fc2' not in name]}, {'params': model.fc2.parameters(), 'lr': 5e-3}], lr=1e-2)

filtering by an if statement but without setting the learning rate. This way those parameters without a specifict learning rate will use the global one