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

RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior. #5

Open
yzakzero opened this issue Sep 24, 2022 · 2 comments

Comments

@yzakzero
Copy link

yzakzero commented Sep 24, 2022

Hi, thank you very much for your work.
When I use my own dataset and model, It error in this Line:
pseudo_grads = torch.autograd. grad(pseudo_loss, pseudo_net.parameters(), create_graph=True)

The following error message is displayed:

RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior.

Looking forward to your reply.

@machineNo6
Copy link

I meet the same problem, do you deal with it?

@yzakzero
Copy link
Author

yzakzero commented Dec 9, 2022 via email

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

No branches or pull requests

2 participants