win7 安装theano+gpu
2016-02-27 21:41
471 查看
参考 http://deeplearning.net/software/theano/install_windows.html
至于theano的安装是比较简答的,可以选择集成的安装包(如:WinPython、Anaconda等),也可以使用python自带的命令pip安装。(Python的安装路径上不能有空格,否则会给后续的配置带来麻烦)
要使用GPU,系统还需安装CUDA驱动。两者都安装好之后,接下来就是要配置theano,使其能用上GPU
在C:\Users\<User name>\ (所谓的Home,或根目录)下建立一个文件 .theanorc.txt 里面复制如下内容:
如果要详细配置各个编程参数,可如下配置:
但在配置这个文件时,要特别注意gcc.cxxflags和nvcc.flags的路径中不能有空格,否则编译会出错。也就是Python的安装路径中不要含空格。
使用WinPython的,配置GPU时要注意配置文件的存放路径:
Theano can be configured with a
file (or
whichever is easier for you to create under Windows). It should be placed in the directory pointed to by the
Please note, that WinPython changes it to
in our system this corresponds to D:\WinPython-2.7.10.3
To use the GPU please write the following configuration file:
至于theano的安装是比较简答的,可以选择集成的安装包(如:WinPython、Anaconda等),也可以使用python自带的命令pip安装。(Python的安装路径上不能有空格,否则会给后续的配置带来麻烦)
要使用GPU,系统还需安装CUDA驱动。两者都安装好之后,接下来就是要配置theano,使其能用上GPU
在C:\Users\<User name>\ (所谓的Home,或根目录)下建立一个文件 .theanorc.txt 里面复制如下内容:
[blas] ldflags = [gcc] cxxflags = [nvcc] fastmath = True [global] device = gpu floatX = float32
如果要详细配置各个编程参数,可如下配置:
[blas] ldflags= [gcc] cxxflags = -ID:\WinPython-2.7.10.3\python-2.7.10.amd64\include [nvcc] fastmath = True --flags=-LD:\WinPython-2.7.10.3\python-2.7.10.amd64\libs --compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\ [global] device = gpu floatX = float32 openmp = False
但在配置这个文件时,要特别注意gcc.cxxflags和nvcc.flags的路径中不能有空格,否则编译会出错。也就是Python的安装路径中不要含空格。
使用WinPython的,配置GPU时要注意配置文件的存放路径:
Configure Theano for GPU use¶
Theano can be configured with a .theanorctext
file (or
.theanorc.txt,
whichever is easier for you to create under Windows). It should be placed in the directory pointed to by the
%USERPROFILE%variable.
Please note, that WinPython changes it to
WinPythonDir\settings(so
in our system this corresponds to D:\WinPython-2.7.10.3
\settings.
To use the GPU please write the following configuration file:
[global] device = gpu floatX = float32 [nvcc] flags = --use-local-env --cl-version=2008
相关文章推荐
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- install and upgrade scrapy
- Scrapy的架构介绍
- Centos6 编译安装Python
- 使用Python生成Excel格式的图片
- 让Python文件也可以当bat文件运行
- [Python]推算数独
- Python中zip()函数用法举例
- Python中map()函数浅析
- Python将excel导入到mysql中
- Python在CAM软件Genesis2000中的应用
- 使用Shiboken为C++和Qt库创建Python绑定
- FREEBASIC 编译可被python调用的dll函数示例
- Python 七步捉虫法