Skip to content

Instantly share code, notes, and snippets.

@p-geon
Created June 29, 2018 09:57
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 p-geon/ea86e783cc0a41a41e753163bc3254bb to your computer and use it in GitHub Desktop.
Save p-geon/ea86e783cc0a41a41e753163bc3254bb to your computer and use it in GitHub Desktop.
GPUconfig = tf.ConfigProto(
gpu_options=tf.GPUOptions(
allow_growth=True
, visible_device_list="0"
)
, device_count={"GPU":1}
)
with tf.Session(graph=graph, config=GPUconfig) as sess:
print(sess.run())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment