关于为 theano 设置 GPU [英] regarding setting up GPU for theano

查看:44
本文介绍了关于为 theano 设置 GPU的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在home/.theanorc下配置GPU如下

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.

推荐答案

可以按照提供的链接 (https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29)这只是一个警告,如果您不修复它,代码应该运行事件.

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.

对于错误,您首先需要确保安装了 nvcc 编译器并且正确设置了路径.假设安装在目录

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

您需要执行以下操作

导出路径=/usr/local/cuda-7.0/bin:$PATH

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

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

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

这篇关于关于为 theano 设置 GPU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆