Thank you very much. It works after updating to the current pytorch version.

I tried not to use any deepcopy at all, but again it failed during optimizer state updating with the same error. No problem for model update.
I checked the link but in their code, they are reproducing the error, I did not get it for my case actually.

Anyway, as soon as I updated the pytorch version, it worked without any problem. Still didn’t get it why but it’s working.
Thanks again.