How to store state_dict in memory and keep it unlinked to the state of the net?

I think it is a same question as below.
if you’ll update all parameters except a few parameter you don’t want to update, it is same that you don’t update a few parameters.