擦干眼泪,老子又是一条好汉,爬起来接着干。
看了一篇运行文章,准备装个Anaconda 接着干。
python2.7, theano-0.9.0, Lasagne (0.2.dev1), flufl.lock (2.4.1), 剩下的numpy,scipy,parse,h5py版本没有要求。
1.安装Anaconda
2.创建一个虚拟环境名叫LIFT
3.按照配置要求在LIFT虚拟环境里装
4.装theano
1.本来以为装好了今天测试时出现
按照这个链接
https://stackoverflow.com/questions/44765376/valueerror-you-are-trying-to-use-the-old-gpu-back-end-when-importing-keras
2.
https://blog.csdn.net/shenqiongniujiahui/article/details/52488668
import theano时,会出现ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: 和WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: cuda unavailable)错误,原因是libc的一个错误,需要设置nvcc.flags=-D_FORCE_INLINES;
显示没有cudnn
如果出现cudnn not available的错误,首先去NVIDIA官网下载cudnn的库,选择和已经安装的cuda的对应的generial 版本。解压后把里面的include和lib64分别copy到cuda的安装目录下的对应的目录里。然后修改thearc的配置, 在global里添加下列一项,强制theano开启cudnn支持。
optimizer_including=cudnn
加上之后还是显示None
https://blog.csdn.net/shenqiongniujiahui/article/details/52488668
配置一下配置文件
生成文件 sudo gedit ~/.theanorc(注意不要漏掉theano前面的一个点)并复制如下内容,然后保存,其中cuda一项的内容为cuda所安装的位置。
- [global]
- device=gpu
- floatX=float32
- root=/usr/local/cuda-8.0
- optimizer_including=cudnn
- [nvcc]
- fastmath = True
- [blas]
- ldflags = -lopenblas
- [cuda]
- root = /usr/local/cuda-8.0
- [nvcc]
- flags=-D_FORCE_INLINES
- [lib]
- cnmem=0.5
5.安装opencv 3.2
https://blog.csdn.net/tsq292978891/article/details/80094873
6.测试
错误 :
/usr/bin/ld: cannot find -lcudnn
collect2: error: ld returned 1 exit status
把theano 配置文件中device=gpu 改成device=cuda
还是有报错
还是再改回去 。
按照
LIFT: Learned Invariant Feature Points完整调试记录(四)测试程序
LIFT: Learned Invariant Feature Points 环境配置
进行测试
出现错误
显示显卡不匹配
其实ubuntu自带命令行版本安装工具ubuntu-drivers,终端输入:
1 ubuntu-drivers devices # 查询所有ubuntu推荐的驱动
安装的驱动就是推荐的驱动
欲知后事如何,等我哭完下篇见分解。