-
Notifications
You must be signed in to change notification settings - Fork 306
Using GPU to train the model #257
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
Comments
Please provide exception and optimizer you are using. Unfortunately free CI does not have GPU to test on :( |
I used the optimizer of Shampoo. And other optimizers also can not work when using GPU. |
Are you running mnist example? I removed line # visualize NN computation graph
writer.add_graph(model, images) it has nothing to do with training but failing with gpu tensors |
Shampoo still may be faulty since it does SVD on CPU regardless if GPU is present. I tested pid/yogi/diffgrad/appolo/adabelief all of them work as expected |
Thanks a lot. I removed the above line and the GPU works! |
@jettify Any plan to update Shampoo to does SVD on GPU? |
Hello, I'm really appreciate your work. But now I wonder how to use GPU to train the model. There are always mistakes when I use the CUDA device. Thanks a lot.
device = torch.device('cuda' if use_cuda else 'cpu')
The text was updated successfully, but these errors were encountered: