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
When I try to deep copy the model, I get this error message RuntimeError('Only Tensors created explicitly by the user (graph leaves) support the deepcopy protocol at the moment. If you were attempting to deepcopy a module, this may be because of a torch.nn.utils.weight_norm usage, see https://github.com/pytorch/pytorch/pull/103001').
It looks like the function torch.nn.utils.weight_norm has been deprecated since torch 2.1 and can be replaced by torch.nn.utils.parametrize.remove_parametrizations.
I tried to replace it as suggested and it works.
The text was updated successfully, but these errors were encountered:
When I try to deep copy the model, I get this error message
RuntimeError('Only Tensors created explicitly by the user (graph leaves) support the deepcopy protocol at the moment. If you were attempting to deepcopy a module, this may be because of a torch.nn.utils.weight_norm usage, see https://github.com/pytorch/pytorch/pull/103001')
.It looks like the function
torch.nn.utils.weight_norm
has been deprecated since torch 2.1 and can be replaced bytorch.nn.utils.parametrize.remove_parametrizations
.I tried to replace it as suggested and it works.
The text was updated successfully, but these errors were encountered: