Last active
June 3, 2016 02:50
-
-
Save bckim92/5459129651c7744d02f1db03426231fa to your computer and use it in GitHub Desktop.
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
# ver1 | |
config = tf.ConfigProto( gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.5), device_count = {'GPU': 1}) | |
sess = tf.Session(config=config) | |
# ver2 | |
config = tf.ConfigProto(log_device_placement=True, device_count={'GPU': 1}) | |
config.gpu_options.per_process_gpu_memory_fraction=0.3 # don't hog all vRAM | |
config.operation_timeout_in_ms=15000 # terminate on long hangs | |
sess = tf.Session(config=config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment