CUDNN is not installed in CUDA directory by default
shubhvachher opened this issue · comments
Shubh Vachher commented
I'm new to torch and have a fresh install just to test out fast style transfer.
Installing cudnn from deb packages installs it in /usr/lib/x86_64-linux-gnu/
as referenced here and in this comment here.
I think support for that in this code is missing. I would add it myself but am quite new to torch and so adding an issue.
$ th train.lua -data ./datasets/ -style_image ./data/textures/862.png -style_size 600 -image_size 512 -model johnson -batch_size 4 -learning_rate 1e-2 -style_weight 10 -style_layers relu1_2,relu2_2,relu3_2,relu4_2 -content_layers relu4_2
/home/user/torch/install/bin/luajit: ...e/user/torch/install/share/lua/5.1/trepl/init.lua:389: ...e/user/torch/install/share/lua/5.1/trepl/init.lua:389: /home/user/torch/install/share/lua/5.1/cudnn/ffi.lua:1603: 'libcudnn (R5) not found in library path.
Please install CuDNN from https://developer.nvidia.com/cuDNN
Then make sure files named as libcudnn.so.5 or libcudnn.5.dylib are placed in
your library load path (for example /usr/local/lib , or manually add a path to LD_LIBRARY_PATH)
Alternatively, set the path to libcudnn.so.5 or libcudnn.5.dylib
to the environment variable CUDNN_PATH and rerun torch.
For example: export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.5"
stack traceback:
[C]: in function 'error'
...e/user/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
train.lua:5: in main chunk
[C]: in function 'dofile'
...user/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50
Solution being :
export CUDNN_PATH="/usr/lib/x86_64-linux-gnu/libcudnn.so.5"