运行tensorflow-gpu报错

已经安装好对应版本的cuda和cudnn之后使用tensorflow依旧报错,错误如下:

2020-12-03 15:00:04.386786: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10'; dlerror: libcudart.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386838: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386883: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386926: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386970: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.387012: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10'; dlerror: libcusparse.so.10: cannot open shared object file: No such file or directory

解决办法:connot open 哪个就运行如下哪个

sudo cp /usr/local/cuda-10.0/lib64/libcudart.so.10 /usr/local/lib/libcudart.so.10 && sudo ldconfig
sudo cp /usr/local/cuda-10.0/lib64/libcublas.so.10 /usr/local/lib/libcublas.so.10 && sudo ldconfig
 sudo cp /usr/local/cuda-10.0/lib64/libcufft.so.10 /usr/local/lib/libcufft.so.10 && sudo ldconfig
 sudo cp /usr/local/cuda-10.0/lib64/libcusolver.so.10 /usr/local/lib/libcusolver.so.10 && sudo ldconfig
 sudo cp /usr/local/cuda-10.0/lib64/libcusparse.so.10 /usr/local/lib/libcusparse.so.10 && sudo ldconfig

注:以上操作已经安装对应版本的cuda和cudnn的前提,出现如下错误。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值