Modify default GPU configure
This commit is contained in:
parent
3d3b611d8e
commit
ee9f723f69
|
@ -396,8 +396,8 @@ if(__name__=='__main__'):
|
||||||
|
|
||||||
#import tensorflow as tf
|
#import tensorflow as tf
|
||||||
#from keras.backend.tensorflow_backend import set_session
|
#from keras.backend.tensorflow_backend import set_session
|
||||||
#os.environ["CUDA_VISIBLE_DEVICES"] = "1"
|
#os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
||||||
#进行配置,使用70%的GPU
|
#进行配置,使用95%的GPU
|
||||||
#config = tf.ConfigProto()
|
#config = tf.ConfigProto()
|
||||||
#config.gpu_options.per_process_gpu_memory_fraction = 0.95
|
#config.gpu_options.per_process_gpu_memory_fraction = 0.95
|
||||||
#config.gpu_options.allow_growth=True #不全部占满显存, 按需分配
|
#config.gpu_options.allow_growth=True #不全部占满显存, 按需分配
|
||||||
|
|
Loading…
Reference in New Issue