Skip to content

Instantly share code, notes, and snippets.

@aidiary
Last active November 27, 2019 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aidiary/670e5099e43815cc31a144f32547e6ab to your computer and use it in GitHub Desktop.
Save aidiary/670e5099e43815cc31a144f32547e6ab to your computer and use it in GitHub Desktop.
[PyTorch] deviceの設定
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