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

can't optimize a non-leaf Tensor #16

Open
damiansmazurek opened this issue May 8, 2020 · 1 comment
Open

can't optimize a non-leaf Tensor #16

damiansmazurek opened this issue May 8, 2020 · 1 comment

Comments

@damiansmazurek
Copy link

Hi
Recently, when running your code on GPU I have error: can't optimize a non-leaf Tensor
Tested on local machine, GCP Compute engine with PyTorch and Cuda.

@mazzzystar
Copy link
Owner

mazzzystar commented May 8, 2020

Bug fixed, thanks for pointing out.
The problem is that we can not set requires_grad=True before .cuda() for PyTorch>0.4.0.
Details can be found in this commit

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