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
[W TensorBody.h:491] Warning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the .grad field to be populated for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch#30531 for more informations. (function grad)
I found the same error in #2133, but there's no specific solution for it.
My code does not have any errors; the only solution now is to suppress the output of these warnings, but this does not fundamentally solve the problem, it merely conceals the warnings.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[W TensorBody.h:491] Warning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the .grad field to be populated for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch#30531 for more informations. (function grad)
I found the same error in #2133, but there's no specific solution for it.
My code does not have any errors; the only solution now is to suppress the output of these warnings, but this does not fundamentally solve the problem, it merely conceals the warnings.
Beta Was this translation helpful? Give feedback.
All reactions