【发布时间】:2018-02-17 12:15:22
【问题描述】:
|进程:GPU 内存 |
| GPU PID 类型 进程名称 用法
| 0 6944 C python3 11585MiB |
| 1 6944 C python3 11587MiB |
| 2 6944 C python3 10621MiB |
tensorflow中途停止后,nvidia-smi内存没有被释放。
试过用这个
config = tf.ConfigProto()
config.gpu_options.allocator_type = 'BFC'
config.gpu_options.per_process_gpu_memory_fraction = 0.90
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
还有
with tf.device('/gpu:0'):
with tf.Graph().as_default():
尝试重置 GPU
sudo nvidia-smi --gpu-reset -i 0
内存根本无法释放。
【问题讨论】:
标签: tensorflow keras tensorflow-gpu