Skip to content

Instantly share code, notes, and snippets.

@koyo922
Last active October 18, 2017 01:50
Show Gist options
  • Save koyo922/220b3e799b6b3db893a5d0e645e61dcb to your computer and use it in GitHub Desktop.
Save koyo922/220b3e799b6b3db893a5d0e645e61dcb to your computer and use it in GitHub Desktop.
tensorflow utils
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" # see issue #152
os.environ["CUDA_VISIBLE_DEVICES"]="0,1"
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment