Created
June 17, 2020 17:00
-
-
Save leopd/2907f33d9ebdee65a469a9bfef16530f to your computer and use it in GitHub Desktop.
How to use a specific GPU, not just the first one
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
# How to use a specific GPU other than the first one. | |
# Put this at the very top of your python script or notebook. | |
# Do this before importing your deep learning libraries. | |
import os | |
os.environ['CUDA_VISIBLE_DEVICES'] = '1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment