Hi @albanD,
I have a question about the params in optimizer.state_dict() and weights in model.state_dict()
From the source code, I found that the grad is computed during backward() and the weights are updated during the optimizer.step().
I try to output the model.state_dict and optimizer.state_dict before and after backward() and optimizer.step() respectively.
If I save the state_dict by
state_dict = model.state_dict()[key]

And they are the same, before and after backward(), it means that assignment operation of tensors is shared memory operation?
Another question is what does params in optimizer.state_dict mean? There is not any change before and after backward and optimizer.step, does it mean an address to the weight?
Thanks in advance