commit
4e4aad07ce
|
@ -17,10 +17,12 @@ from SpeechModel251 import ModelSpeech
|
|||
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
||||
#进行配置,使用90%的GPU
|
||||
config = tf.ConfigProto()
|
||||
config = tf.compat.v1.ConfigProto()
|
||||
config.gpu_options.per_process_gpu_memory_fraction = 0.9
|
||||
#config.gpu_options.allow_growth=True #不全部占满显存, 按需分配
|
||||
set_session(tf.Session(config=config))
|
||||
sess = tf.compat.v1.Session(config=config)
|
||||
tf.compat.v1.keras.backend.set_session(sess)
|
||||
|
||||
|
||||
|
||||
datapath = ''
|
||||
|
|
|
@ -16,10 +16,11 @@ from SpeechModel251 import ModelSpeech
|
|||
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
||||
#进行配置,使用95%的GPU
|
||||
config = tf.ConfigProto()
|
||||
config = tf.compat.v1.ConfigProto()
|
||||
config.gpu_options.per_process_gpu_memory_fraction = 0.95
|
||||
#config.gpu_options.allow_growth=True #不全部占满显存, 按需分配
|
||||
set_session(tf.Session(config=config))
|
||||
sess = tf.compat.v1.Session(config=config)
|
||||
tf.compat.v1.keras.backend.set_session(sess)
|
||||
|
||||
|
||||
datapath = ''
|
||||
|
|
Loading…
Reference in New Issue