跑cifar训练集所遇到的需要升级cudnn的问题及解决方法

报错:

E tensorflow/stream_executor/cuda/cuda_dnn.cc:390]Loaded runtime CuDNN library: 7100 (compatibility version 7100) but source wascompiled with 7200 (compatibility version 7200).  If using a binary install, upgrade your CuDNNlibrary to match.  If building fromsources, make sure the library loaded at runtime matches a compatible versionspecified during compile configuration.

F tensorflow/core/kernels/conv_ops.cc:605]Check failed: stream->parent()->GetConvolveAlgorithms(&algorithms)

已放弃 (核心已转储)
 

编译需要的cudnn版本7.2以上,我的是7.1

解决方法:

1.下载新版本cudnn

        你可以在官网下载,当然需要自己login和survey,然后选择download -> I Agree…… -> Archived cuDNN Releases -> 找到匹配你的CUDA的cudnn的需要版本(cudnn 7.3.1.20)

2.删除原来的cudnn

        包括原来解压的cudnn目录、原来/usr/local/cuda-9.0/lib64中的旧版本libcudnn.so、libcudnn.so.x、libcudnn.so.x.x.x

#命令行操作
cd /usr/local/cuda-9.0/lib64/ sudo rm -rf libcudnn.so libcudnn.so.7 libcudnn.so.7.1.10

进入你下载的cudnn解压目录
sudo cp lib64/lib* /usr/local/cuda-9.0/lib64

sudo cp  include/cudnn.h /usr/local/cuda-9.0/include

再进入/usr/local/cuda-9.0/lib64 目录下

sudo chmod +r libcudnn.so.7.3.1

sudo ln -sf libcudnn.so.7.3.1 libcudnn.so.7

sudo ln -sf libcudnn.so.7 libcudnn.so

sudo ldconfig

 

大功告成!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值