For me, I encountered an error.  Apparently, the reason is that Optimizers also store state attribute as shown in this line 3. I think this state stores things like momentum which changes per iteration.
Having said this, this is how I reset my parameters:
lstm = torch.nn.LSTM(3,10)
optim = torch.optim.Adam(lstm.parameters())

# train a bit and then delete the parameters from the optimizer
# in order not to train them anymore 
optim.param_group.clear() # optim.param_group = []
optim.state.clear() # optim.state = defaultdict(dict)

# create a new LSTM and train it instead of the old one
new_lstm = torch.nn.LSTM(3,10)
optim.add_param_group(
    {'params' : [p for p in new_lstm.parameters()]}
)