训练时GPU不够用的话怎么办办呢

1.首先查看能调用的gpu的情况
python
import tensorflow as tf
tf.test.gpu_device_name()
2. 查看gpu的资源占用情况
nvidia-smi
3.使用fuser命令显示所有占用nvidia设备的进程processID。
sudo fuser /dev/nvidia*
4.杀死所有进程
killall -u 用户名

PS: 我的机器显示有一个GPU设备被ignore了
如图所示解决方法:
输入export TF_MIN_GPU_MULTIPROCESSOR_COUNT=5

Note though that the default is set for a reason – if you enable slower GPU by changing that variable, your program may run slower than it would without any GPU available, because TensorFlow will try to put run everything on that GPU.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值