解决Tensorflow使用CPU而不用GPU的问题
tensorflow
一个面向所有人的开源机器学习框架
项目地址:https://gitcode.com/gh_mirrors/te/tensorflow
免费下载资源
·
之前的文章讲过用Tensorflow的object detection api训练MobileNetV2-SSDLite,然后发现训练的时候没有利用到GPU,反而CPU占用率贼高(可能会有Could not dlopen library 'libcudart.so.10.0'
之类的警告)。经调查应该是Tensorflow的GPU版本跟服务器所用的cuda及cudnn版本不匹配引起的。知道问题所在之后就好办了。
检查cuda和cudnn版本
首先查看cuda版本:
cat /usr/local/cuda/version.txt
以及cudnn版本:
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
重新安装对应版本Tensorflow
根据前面查看得到的cuda和cudnn版本,到Tensorflow官网查看对应的Tensorflow-GPU版本,然后用conda install tensorflow-gpu=[version]
重新安装(把[version]换成对应的版本比如1.12)就OK了。
GitHub 加速计划 / te / tensorflow
184.54 K
74.12 K
下载
一个面向所有人的开源机器学习框架
最近提交(Master分支:1 个月前 )
a49e66f2
PiperOrigin-RevId: 663726708
1 个月前
91dac11a
This test overrides disabled_backends, dropping the default
value in the process.
PiperOrigin-RevId: 663711155
1 个月前
更多推荐
已为社区贡献1条内容
所有评论(0)