2017-03-16 48 views

回答

0

默認情況下,tensorflow可以增長到所有GPU內存的總和。 您可以通過一個會話設置配置限制它:

gpu_memory_fraction = 0.4 # Fraction of GPU memory to use 
config = tf.ConfigProto(gpu_options= 
         tf.GPUOptions(per_process_gpu_memory_fraction=gpu_memory_fraction))       
sess = tf.Session(config=config) 
+1

萬分感謝。 – Austin

相關問題