You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Module.to doesn't transfer parameters in ParameterList or ParameterDict #1179
When moving a ParameterList or ParameterDict Module, the registered values get moved but the field doesn't get the updated values.
For example, in the case below, the output would be Float32. If you would inspect the _internal_params list you would see that the parameter there is actually Float16.
This also means that the garbage collector will never dispose of the old parameter since they are both being referenced.
Activity
NiklasGustafsson commentedon Dec 8, 2023
I believe the solution to this is to override
_to()in ParameterList, ParameterDict, ModuleList, and ModuleDict.