Created
August 30, 2019 21:12
-
-
Save Lexie88rus/56979290f9775dbeca8fb99956a27512 to your computer and use it in GitHub Desktop.
Setup hyperparameters and training device
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
# setup learning rate and loss function | |
learning_rate = 0.005 | |
criterion = nn.NLLLoss() | |
# device to use (GPU if available, CPU otherwise) | |
device = torch.device('cuda:0' if torch.cuda.is_available() else "cpu") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment