Skip to content

Instantly share code, notes, and snippets.

@qin-yu
Last active January 19, 2020 14:30
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 qin-yu/c0ab33c259af8327241e126821b77e42 to your computer and use it in GitHub Desktop.
Save qin-yu/c0ab33c259af8327241e126821b77e42 to your computer and use it in GitHub Desktop.
how to specify gpu used for python scripts

If you have > 1 gpu, the first gpu is #0 and the second is therefore #1, etc.

$ CUDA_VISIBLE_DEVICES=1 python3 ~/.../faceswap.py train -A ~/.../face1 -B ~/.../face2 -m ~/.../models -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment