最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

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

业界 admin 3浏览 0评论

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.

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.

发布评论

评论列表 (0)

  1. 暂无评论