Created
March 2, 2020 07:55
-
-
Save aurora1625/ff190da541ddba162abba6cf8147ba4a to your computer and use it in GitHub Desktop.
Pytorch
This file contains 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
# PyTorch device | |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") | |
X = torch.randn(n_points, 2).to(device) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment