ValueError: can't optimize a non-leaf Tensor
See original GitHub issueWhen I try to use the nca part of the dim_reduct example I get ValueError: can't optimize a non-leaf Tensor
, any idea what could be wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ValueError: can't optimize a non-leaf Tensor? - PyTorch Forums
Dear all: i know when x_cuda = x_cpu.to(device) It will trigger error: ValueError: can't optimize a non-leaf Tensor when you use optimizer ...
Read more >torch.optim returns "ValueError: can't optimize a non-leaf ...
Only leaf tensors can be optimised. A leaf tensor is a tensor that was created at the beginning of a graph, i.e. there...
Read more >confusing error message ValueError: can't optimize a non-leaf ...
Your first line fails because each tensor happens to be an iterable of slices so the optimizer class receives slices of parameters, i.e....
Read more >ValueError: can't optimize a non-leaf Tensor
I am following an example like below which is working in early 2020 year : from torch.optim import Adam pyro.clear_param_store() def ...
Read more >Value Error : can't optimize a non-leaf Tensor - fastai dev
optimizer = torch.optim.Adam(dp_module.parameters() , lr = 1e-3). It gives error as. ValueError: can't optimize a non-leaf Tensor .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @joaogui1, should be fixed in the newest commit thanks to @brentyi ! Cheers
@lidh15 forgot to push it to pypi, should be available shortly. Do let me know if it works out!