It depends on what you’ll be doing. For instance, the following snippet works well:
import torch
model = torch.nn.Linear(2, 3)
def change_params(net):
    for param in net.parameters():
        #do something
        if param.numel() == 3: # Disabling grad for the biases
            param.requires_grad_(False)


for p in model.parameters(): print(p) # Before

change_params(model)

for p in model.parameters(): print(p) # After


You can’t do anything with the model’s parameters, for instance, the following snippet throws an error:
import torch
model = torch.nn.Linear(2, 3)
def change_params(net):
    for param in net.parameters():
        #do something
        param += torch.ones_like(param)

for p in model.parameters(): print(p) # Before

change_params(model)

for p in model.parameters(): print(p) # After


Moreover, it might just ignore what you want to do, for instance:
import torch
model = torch.nn.Linear(2, 3)
def change_params(net):
   for param in net.parameters():
       #do something
       param = param.double()


for p in model.parameters(): print(p.type())

change_params(model)

for p in model.parameters(): print(p.type())

So, it depends on what you want to do.