http://deeplearning.net/software/theano/tutorial/using_gpu.html
1.安装cuda
下载:https://developer.nvidia.com/cuda-downloads
2.添加环境变量
$ export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
$ export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
3.切换用户主目录下
cd ~
vim .theanorc
添加配置:
[global]
device = gpu
floatX = float32
[cuda]
root = /usr/local/cuda
4.运行测试代码
http://deeplearning.net/software/theano/tutorial/using_gpu.html