-
Notifications
You must be signed in to change notification settings - Fork 157
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
Some points predicted by a net can't be backward using gpu. #59
Comments
I have the same issues too. (CPU works but GPU does not work). Or we will have illegal memory access error |
I try to sovle this problem by initing Path with the value that net predicted, then let gpu just optimize the path's point tensor, then let it backward first, after it just using a L1 loss to let net's pred logits close to optimized path's point. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I encountered a problem while using diffvg. I used a ResNet18 network added with a 3-layer MLP network to predict the control point coordinates of a path, which was rendered by diffvg to obtain the img tensor, then I use it calculate a L1 loss with my target. However, during the loss backpropagation, cuda report an error of device error, seems like some tensor needed was not sent to gpu , but if I transfer the control point coordinates to cpu, diffvg will use all tensors on cpu during rendering without this problem.
I looked through the examples in /app, I also found that some examples (GAN) also calculate loss with tensor from cpu. I’m not sure if this operation can be done on gpu?
The text was updated successfully, but these errors were encountered: