Deep Learning: win7安装Theano,配置GPU

1. 安装 AnacondaCE:

下载地址:http://repo.continuum.io/archive/index.html 和 http://repo.continuum.io/anaconda3/ 

我是win64,选择Anaconda-1.4.0-Windows-x86_64.exe安装

Anaconda会自动安装python.exe和theano的所有依赖项


2. 安装 Theano:

下载地址:https://github.com/Theano/Theano-wininstaller/raw/master/bin/theano_installer_latest.msi

默认安装完成之后,会在cmd的根目录下(打开cmd时显示的目录)生成一个 theanorc_default.txt文件,里面的内容为:

[global]
openmp=False

[blas]
ldflags=

为了使用GPU,我们将theanorc_default.txt文件名改为theanorc.txt,同时将其中的内容改为:

[blas]
ldflags =

[gcc]
cxxflags = -ID:\Anaconda\MinGW

[nvcc]
fastmath = True
flags=-LD:\Anaconda\libs
compiler-bindir=D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
base_compiledir=path_to_a_directory_without_such_characters

[global]
floatX = float32
device = gpu0


3. 配置GPU:

CUDA的配置:http://blog.csdn.net/yeyang911/article/details/17450963


4. 下载DeepLearningTutorials测试代码

下载地址:https://github.com/lisa-lab/DeepLearningTutorials



另外几个链接:【1】 【2】 【3】   官方安装方法:【4】


按照上述安装,theano里除了convolutional_mlp.py以外的所有代码都可以运行,当运行convolutional_mlp.py时出现以下错误:

ValueError: Was not able to allocate output!
WARNING (theano.gof.compilelock): Overriding existing lock by dead process '5216' (I am process '5488')
Error allocating 5760000 bytes of device memory (unknown error).

调试之后发现是theano库中function_module.py代码出现了问题,于是用自己下载的theano-mater中的theano子文件夹(【Theano-master下载】)替换掉theano_installer_latest.msi自动安装的theano(Anaconda\Lib\site-packages\theano),问题解决~~


  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值