Created
August 10, 2024 16:21
-
-
Save mypapit/7f9e286ae77be90404f9c2a2b3240a8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia. | |
| import torch | |
| device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') | |
| # Assuming that we are on a CUDA machine, this should print a CUDA device: | |
| print(device) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment