Meta-Weight-Net_Code-Optimization icon indicating copy to clipboard operation
Meta-Weight-Net_Code-Optimization copied to clipboard

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.

Open yzakzero opened this issue 2 years ago • 2 comments

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.

yzakzero avatar Sep 24 '22 04:09 yzakzero