Runtime Error thrown when using Optimizer in a Pytorch Function: element 0 of tensors does not require grad and does not have a grad_fn #8847
Labels
todo
Not as important as medium or high priority tasks, but we will work on these.
Issue description
When I am trying to run an optimizer on a separate variable inside a pytorch function, pytorch throws an error,
element 0 of tensors does not require grad and does not have a grad_fn
.Code example
Error
System Info
The text was updated successfully, but these errors were encountered: