在linux在anaconda下安装theano时(参考使用conda安装theano环境)
测试theano时报错use old gpu back-end,将~/.theanorc中device=gpu更改为device=cuda,再次运行,报错为缺模块pygpu。
在conda install pygpu后,仍不能运行,显示找不到cudnn.h的位置,解决办法是在~/.theanorc文件中,添加:
[dnn]
include_path=/usr/local/cuda/include/
library_path=/usr/local/cuda/lib64/
我的理解里,include_path对应cudnn.h的位置,library_path对应与之相应lib*文件,进入文件夹查看是对应的,但在测试theano程序时仍然报错,查找解决办法时根据Github上的解决办法,将~/.theanorc文件中[dnn]部分换为:
[dnn]
base_path = /usr/local/cuda
可以运行theano程序。