theano程序(三)
来源:互联网 发布:qq牧场飞鸟升级数据 编辑:程序博客网 时间:2024/05/09 11:48
#使用CPU还是GPU依赖于你的.theanorc文件中定义的环境变量。
#当前,应该使用GPU定义的float32,但大多数人喜欢使用CPU定义的float64
#theano提供了配置变量floatX 来设置到底使用GPU还是CPU
#为了看得清楚,我的电脑上的.theanorc文件内容列出来,内容如下:
'''
# 文件C:\Documents and Settings\sf\.theanorc.txt的内容如下,则设置成GPU
#设置完成后,需要注销当前windows用户重新登录才能生效.
#sf是电脑上的用户名。
[global]
openmp=False
floatX = float32
device = gpu0
[blas]
ldflags=
[gcc]
cxxflags = -IC:\MinGW\include
'''
源程序如下:
import theano
print theano.config.device
print theano.config.floatX
'''显示内容为
gpu0
float32
'''
'''
# 文件C:\Documents and Settings\sf\.theanorc.txt的内容修改如下,也即采用默认值:
[global]
openmp=False
[blas]
ldflags=
[gcc]
cxxflags = -IC:\MinGW\include
'''
'''
源程序如下:
print theano.config.device
print theano.config.floatX
'''
'''显示内容为
cpu
float64
'''
# 也可以在运行过程中 获取和设置floatX的值
old_floatX = theano.config.floatX
theano.config.floatX = 'float64'
print theano.config.device
print theano.config.floatX
- theano程序(三)
- theano程序(一)
- theano 程序(二)
- theano程序(四)
- theano程序(五)
- theano tutorial -- 用theano实现逻辑回归LR(三)theano实现LR算法
- Theano学习三----Theano function
- 深度学习(三)theano入门学习
- 深度学习(三)theano入门学习
- 深度学习(三)theano入门学习
- 深度学习(三)theano入门学习
- theano tutorial(三)
- Theano学习笔记(三)——图结构
- DeepLearning工具Theano学习记录(三) CNN卷积神经网络
- 用Theano学习Deep Learning(三):卷积神经网络
- Theano学习笔记(三)——图结构
- Python学习笔记(三)windows下安装theano
- Theano Tutorial文档翻译(三) - 基础张量功能
- FFMPEG教程3_播放声音(使用2014年新SDK重新整理编译通过)
- 网络流小结
- XSLT命名空间输出&&内部调用
- JAVA调用Linux/Unix CMD
- etl工具,kettle实现循环
- theano程序(三)
- MFC修改控件的Tab顺序
- [tarjan] hdu 3836 Equivalent Sets
- ADT下载
- Python 学习
- VS2008创建DLL时无法选择X64的解决方法
- hint禁用
- 牛腩javascript(二)之正则表达式
- C++头文件包含于前置声明