Get filtered model parameters

Say I have a model,

How do I get model.parameters() but filter out params with has certain name (e.g. “conv1”, “conv2”)

This is because I want to make two optimizers, where both optimize different params

Thank you

hi, there exist another method called named_parameters:

for name,param in model.named_parameters():
    do your stuff