regarding setting up GPU for theano

无人久伴 提交于 2020-01-05 05:44:08

问题


I configure the GPU under home/.theanorc as follows

bash-4.1$ cat .theanorc
[global]
floatX = float32
device = gpu0

[lib]
cnmem = 1

Running the program gives the following warning message, how to solve this problem?

python train.py                                                                        
Using Theano backend.                                                                                                     
WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10).  Please switch to the gpuarray backend. You can get more information about how to switch at this URL:                                                                          
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29                                                        

ERROR (theano.sandbox.cuda): nvcc compiler not found on $PATH. Check your nvcc installation and try again.

回答1:


The warning regarding the cuda backend can be mitigated by following the steps in the provided link (https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29) This is only a warning and the code should run event if you don't fix it.

For the error you first need to make sure that nvcc compiler is installed and the path is setup correctly. assuming the installation is in the directory

/usr/local/cuda-7.0

you need to do the following

export PATH=/usr/local/cuda-7.0/bin:$PATH

and

export LD_LIBRARY_PATH=/usr/local/cuda-7.0/targets/x86_64-linux/lib:$LD_LIBRARY_PATH



来源:https://stackoverflow.com/questions/42816217/regarding-setting-up-gpu-for-theano

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!