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

1.首先查看能调用的gpu的情况 python import tensorflow as tf tf.test.gpu_device_name() 2. 查看gpu的资源占用情况 nvidia-smi 3.使用fuser命令显示所有占用nv

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.

发布者:admin,转转请注明出处:http://www.yc00.com/web/1740120260a4192891.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信