林彥君
林彥君

Reputation: 21

cudnn can't be install

I am trying the LeNet5 on theano using cuda 8.0 windows 10 GTX 770M, and it seems the params cannot be updated correctedly. When I import theano, I will get this error:

Can not use cuDNN on context None: cannot compile with cuDNN. We got this error:
c:\users\yanjun~1\appdata\local\temp\try_flags_8n7fhy.c:4:19: fatal error: cudnn.h: No such file or directory
compilation terminated.

Mapped name None to device cuda: GeForce GTX 770M (0000:01:00.0)

I have installed cudnn 5 to my cuda 8.0 by copying the files to "NVIDIA GPU Computing Toolkit\CUDA\v8.0", but still the same error shows.

Is it because theano cannot compile the cudnn, both conv2d and pool_2d cannot work properly? As result, my error rate keeps around 90% while training. Did I install cudnn correctly? I just followed the instructions on theano's documentation, but no .so* file in the zip.

I've tried the cpu mode, it can be trained properly but really really slow.

Hope you guys could help me out of this where I am stuck for servel days.

Many thanks!

Upvotes: 1

Views: 1845

Answers (1)

Roelant
Roelant

Reputation: 5119

I had a similar problem when migrating to the new theano back-end, and fixed it with the following steps (inside my conda environment).

  1. Update theano with conda update theano and get pygpy with conda install -c rdonnelly pygpu. I'm installing a RC package since it gave less issues.
  2. Check if you need to make changes to your code here Since I was using keras, I did not have to do so.
  3. Change theanorc from device = gpu to device = cuda0. If you went to the above link, you might have already done so.
  4. Add to the bottom of your theanorc file:

    compiler_bindir = C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
    
    [cuda]
    root = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
    
    [dnn]
    library_path = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64
    include_path = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include
    

Upvotes: 1

Related Questions