[Theano] Theano初探
1. Theano用来干嘛的?
Theano was written at the LISA lab to support rapid development of efficient machine learning algorithms. Theano is named after the Greek mathematician, who may have been Pythagoras’ wife. Theano is released under a BSD license (link).
加快处理多维数组计算。Theano is a Python library that lets you to define, optimize, and evaluate mathematical expressions, especially ones with multi-dimensional arrays (numpy.ndarray). Using Theano it is possible to attain speeds rivaling hand-crafted C implementations for problems involving large amounts of data. It can also surpass C on a CPU by many orders of magnitude by taking advantage of recent GPUs.
Theano’s compiler applies many optimizations of varying complexity to these symbolic expressions. These optimizations include, but are not limited to:
- use of GPU for computations
- constant folding
- merging of similar subgraphs, to avoid redundant calculation
- arithmetic simplification (e.g.
x*y/x -> y,--x -> x) - inserting efficient BLAS operations (e.g.
GEMM) in a variety of contexts - using memory aliasing to avoid calculation
- using inplace operations wherever it does not interfere with aliasing
- loop fusion for elementwise sub-expressions
- improvements to numerical stability (e.g.
and
) - for a complete list, see Optimizations
2. 安装Theano
我用的是Ubuntu,所以戳Easy Installation of an Optimized Theano on Current Ubuntu. (其它系统见Installing Theano)
直接用下面指令就安装完成了
For Ubuntu 11.10 through 14.04:
#sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
#sudo pip install Theano
3. 测试一下logistic function
import theano
import theano.tensor as T
x = T.dmatrix('x')
s = 1 / (1 + T.exp(-x))
logistic = theano.function([x], s)
logistic([[0, 1], [-1, -2]])
如果没有报错就完成了
[Theano] Theano初探的更多相关文章
- 手把手教你搭建深度学习平台——避坑安装theano+CUDA
python有多混乱我就不多说了.这个混论不仅是指整个python市场混乱,更混乱的还有python的各种附加依赖包.为了一劳永逸解决python的各种依赖包对深度学习造成的影响,本文中采用pytho ...
- Theano在windows下的安装及GPU加速
安装环境:wondows 64bit Teano安装测试 1. Anaconda 安装 Anaconda是一个科学计算环境,自带的包管理器conda很强大.之所以选择它是因为它内置了python,以及 ...
- linux install Theano+Tensorflow+Keras
安装过程中,网络状态一定要好,如果安装过程中出现time out的提示信息,今天就可以洗洗睡啦,等明天网络状态好的时候再安装. 安装过程出现不知名的错误的时候,执行第一步,update一下 1.#up ...
- Ubuntu-安装-theano+caffe-超详细教程
一.说明 本文是继<Ubuntu-安装-cuda7.0-单显卡-超详细教程> 之后的续篇.theano和caffe是深度学习库,对运算能力需求很大,最好使用cuda进行加速.所以,请先阅读 ...
- win7+theano with GPU enabled
要做卷积神经网络的一些东西,所以要装theano,网上很多Theano安装教程版本较老,而各安装包更新很快,参考价值有限.走了很多弯路才装好,把这个过程记录下来,希望对大家有帮助~ ~ 我的配置:wi ...
- theano + gpu
Teano安装测试 1. Anaconda 安装 Anaconda是一个科学计算环境,自带的包管理器conda很强大.之所以选择它是因为它内置了python,以及numpy.scipy两个必要库和一些 ...
- Theano在CentOS 6 下的安装及GPU加速
系统版本:Red Hat 4.4.6-4 一. 未联网情况下,选择本地安装. 首先安装theano的依赖库,包括:scipy-0.16.1numpy-1.9.2nose-1.3.7 (optional ...
- 布置theano(Windows10,无cuda)
软件包准备 1.Anaconda 下载地址,包含python.numpy.scipy.nose.pip等包,嗯,很爽. 2.tdm64-gcc 下载地址,windows下的gcc.g++编译器,用来t ...
- 布置theano(Ubuntu14.04 LTS)
引言 由于研究生阶段将会从事自然语言处理方向的研究,目前要用到机器学习和深度学习相关的框架,那应老师的要求,将要使用theano,由于theano官方文档中关于ubuntu下配置的问题并没有给出很好的 ...
随机推荐
- 数据的动态合并和导出至EXCEL
最近一段时间都在处理数据的动态合并和导出EXCEL的问题,写个demo记录下,希望和我碰到同样问题的博友可以顺利解决:后面会提供demo下载链接. (VS2012,ASP.NET) 一.主要解决以下问 ...
- power desinger 学习笔记<二>
power designer 设计表时显示注释选项 PowerDesigner设计时表显示注释选项: 选定编辑的表,右键- > Properties- > Columns- > Cu ...
- AVAudioSession
AVAudioSession类由AVFoundation框架引入.每个IOS应用都有一个音频会话.这个会话可以被AVAudioSession类的sharedInstance类方法访问,如下: AVAu ...
- CoreMotion(加速计)
加速计的作用 用于检测设备的运动(比如摇晃) 加速计的经典应用场景 摇一摇 计步器 ********************************** Core Motion获取数据的两种方式 pu ...
- 10集合:List<T>,Dictionary<K,V>
List<T>泛型集合 List<T>是C#中一种快捷.易于使用的泛型集合类型,使用泛型编程为编写面向对象程序增加了极大的效率和灵活性. 1.List<T>用法 ...
- hdoj 1892(二维树状数组)
Problem H Time Limit : 5000/3000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other) Total Sub ...
- .NET序列化的一点技巧
介绍 序列化是将对象状态转换为可保持或传输的形式的过程.序列化的补集是反序列化,后者将流转换为对象.这两个过程一起保证数据易于存储和传输. .NET Framework 提供了两个序列化技术: 二进制 ...
- 如何在Android Studio中使用Gradle发布项目至Jcenter仓库
简述 目前非常流行将开源库上传至Jcenter仓库中,使用起来非常方便且易于维护,特别是在Android Studio环境中,只需几步配置就可以轻松实现上传和发布. Library的转换和引用 博主的 ...
- ps使用方法续
1.找一张皱折的背景,将需要制作的照片拖入背景层,调整尺寸并裁剪,使之 与背景边框相配, 2.调整-色相饱和度,全图:饱和度-35,明度+10, 3.调整图层改成柔光模式,出来旧照片的效果了, 4.色 ...
- 将数据库字段从float修改为decimal
decimal(6,2) 可以表示0000.00~9999.99 alter table test modify aaa decimal(6,2); 则表里所有大于10000的数会被设置为9999.9 ...