如何在Windows 7 64位上使用theano设置cuDnn

我已经安装了Theano框架并在我的机器上启用了CUDA,但是当我在我的python控制台中导入theano时,我收到以下消息:

 >>> import theano Using gpu device 0: GeForce GTX 950 (CNMeM is disabled, CuDNN not available) 

现在“CuDNN不可用”,我从Nvidia网站下载了cuDnn 。 我还更新了环境中的“path”,并在“.theanorc.txt”configuration文件中添加了“optimizer_including = cudnn”。

然后,我再次尝试,但失败,与:

 >>> import theano Using gpu device 0: GeForce GTX 950 (CNMeM is disabled, CuDNN not available) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Anaconda2\lib\site-packages\theano\__init__.py", line 111, in <module> theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1() File "C:\Anaconda2\lib\site-packages\theano\sandbox\cuda\tests\test_driver.py", line 31, in test_nvidia_driver1 profile=False) File "C:\Anaconda2\lib\site-packages\theano\compile\function.py", line 320, in function output_keys=output_keys) File "C:\Anaconda2\lib\site-packages\theano\compile\pfunc.py", line 479, in pfunc output_keys=output_keys) File "C:\Anaconda2\lib\site-packages\theano\compile\function_module.py", line 1776, in orig_function output_keys=output_keys).create( File "C:\Anaconda2\lib\site-packages\theano\compile\function_module.py", line 1456, in __init__ optimizer_profile = optimizer(fgraph) File "C:\Anaconda2\lib\site-packages\theano\gof\opt.py", line 101, in __call__ return self.optimize(fgraph) File "C:\Anaconda2\lib\site-packages\theano\gof\opt.py", line 89, in optimize ret = self.apply(fgraph, *args, **kwargs) File "C:\Anaconda2\lib\site-packages\theano\gof\opt.py", line 230, in apply sub_prof = optimizer.optimize(fgraph) File "C:\Anaconda2\lib\site-packages\theano\gof\opt.py", line 89, in optimize ret = self.apply(fgraph, *args, **kwargs) File "C:\Anaconda2\lib\site-packages\theano\gof\opt.py", line 230, in apply sub_prof = optimizer.optimize(fgraph) File "C:\Anaconda2\lib\site-packages\theano\gof\opt.py", line 89, in optimize ret = self.apply(fgraph, *args, **kwargs) File "C:\Anaconda2\lib\site-packages\theano\sandbox\cuda\dnn.py", line 2508, in apply dnn_available.msg) AssertionError: cuDNN optimization was enabled, but Theano was not able to use it. We got this error: Theano can not compile with cuDNN. We got this error: >>> 

任何人都可以帮助我? 谢谢。

应该有办法通过设置只有path环境variables,但我永远不能得到这个工作。 唯一对我有用的是将CuDNN文件手动复制到CUDA安装中的相应文件夹中。

例如,如果您的CUDA安装位于C:\ CUDA \ v7.0中,并且您将CuDNN提取到C:\ CuDNN,则您将复制如下:

  • C:\ CuDNN \ lib \ x64 \的内容将被复制到C:\ CUDA \ v7.0 \ lib \ x64 \
  • C:\ CuDNN \ include \的内容将被复制到C:\ CUDA \ v7.0 \ include \
  • C:\ CuDNN \ bin \的内容将被复制到C:\ CUDA \ v7.0 \ bin \

之后,它应该工作。

除了我所做的所有工作之外,我还在家庭文件夹中更新了以下.theanorc.txt的内容,并在此之后进行了工作。

 [lib] #cnmem=1.0 cudnn=1.0 
Interesting Posts