import tensorflow as tf
import os
os.environ["CUDA_VISIBLE_DEVICES"] = '0' #use GPU with ID=0
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.5 # maximun alloc gpu50% of MEM
config.gpu_options.allow_growth = True #allocate dynamically
sess = tf.Session(config = config)

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2022-01-05
  • 2021-07-01
  • 2022-12-23
  • 2021-12-07
  • 2021-11-27
  • 2021-10-17
猜你喜欢
  • 2022-12-23
  • 2021-07-30
  • 2021-07-21
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2021-08-25
相关资源
相似解决方案