Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deep copy DAC model #81

Open
txya900619 opened this issue Jul 11, 2024 · 0 comments
Open

Can't deep copy DAC model #81

txya900619 opened this issue Jul 11, 2024 · 0 comments

Comments

@txya900619
Copy link

txya900619 commented Jul 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant