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:

  1. #sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
  2. #sudo pip install Theano

3. 测试一下logistic function

  1. import theano
  2. import theano.tensor as T
  3. x = T.dmatrix('x')
  4. s = 1 / (1 + T.exp(-x))
  5. logistic = theano.function([x], s)
  6. logistic([[0, 1], [-1, -2]])

如果没有报错就完成了

[Theano] Theano初探的更多相关文章

  1. 手把手教你搭建深度学习平台——避坑安装theano+CUDA

    python有多混乱我就不多说了.这个混论不仅是指整个python市场混乱,更混乱的还有python的各种附加依赖包.为了一劳永逸解决python的各种依赖包对深度学习造成的影响,本文中采用pytho ...

  2. Theano在windows下的安装及GPU加速

    安装环境:wondows 64bit Teano安装测试 1. Anaconda 安装 Anaconda是一个科学计算环境,自带的包管理器conda很强大.之所以选择它是因为它内置了python,以及 ...

  3. linux install Theano+Tensorflow+Keras

    安装过程中,网络状态一定要好,如果安装过程中出现time out的提示信息,今天就可以洗洗睡啦,等明天网络状态好的时候再安装. 安装过程出现不知名的错误的时候,执行第一步,update一下 1.#up ...

  4. Ubuntu-安装-theano+caffe-超详细教程

    一.说明 本文是继<Ubuntu-安装-cuda7.0-单显卡-超详细教程> 之后的续篇.theano和caffe是深度学习库,对运算能力需求很大,最好使用cuda进行加速.所以,请先阅读 ...

  5. win7+theano with GPU enabled

    要做卷积神经网络的一些东西,所以要装theano,网上很多Theano安装教程版本较老,而各安装包更新很快,参考价值有限.走了很多弯路才装好,把这个过程记录下来,希望对大家有帮助~ ~ 我的配置:wi ...

  6. theano + gpu

    Teano安装测试 1. Anaconda 安装 Anaconda是一个科学计算环境,自带的包管理器conda很强大.之所以选择它是因为它内置了python,以及numpy.scipy两个必要库和一些 ...

  7. Theano在CentOS 6 下的安装及GPU加速

    系统版本:Red Hat 4.4.6-4 一. 未联网情况下,选择本地安装. 首先安装theano的依赖库,包括:scipy-0.16.1numpy-1.9.2nose-1.3.7 (optional ...

  8. 布置theano(Windows10,无cuda)

    软件包准备 1.Anaconda 下载地址,包含python.numpy.scipy.nose.pip等包,嗯,很爽. 2.tdm64-gcc 下载地址,windows下的gcc.g++编译器,用来t ...

  9. 布置theano(Ubuntu14.04 LTS)

    引言 由于研究生阶段将会从事自然语言处理方向的研究,目前要用到机器学习和深度学习相关的框架,那应老师的要求,将要使用theano,由于theano官方文档中关于ubuntu下配置的问题并没有给出很好的 ...

随机推荐

  1. html input 文本框的一些操作(限制输入...)

    1.取消按钮按下时的虚线框 在input里添加属性值 hideFocus 或者 HideFocus=true 2.只读文本框内容 在input里添加属性值 readonly 3.防止退后清空的TEXT ...

  2. Android ListView 嵌套 ImageView,如何响应ImageView的点击和长按事件

    http://www.tuicool.com/articles/EZv2Uv 1.先说下嵌套在ListView中的ImageView如何响应点击事件 方法:在imageView中设置onClick属性 ...

  3. C# - Sql数据类型的对应关系

    <Language From="SQL" To="C#"> <Type From="bigint" To="lo ...

  4. c# 左连接写法

    var itemandformulas = from i in AttendanceItemList join f in AttendanceFormulaList on i.AttendanceCo ...

  5. Android布局管理器(贞布局)

    贞布局有FrameLayout所代表,它直接继承了ViewGroup组建 贞布局为每个加入其中的组件创建一个空白区域(一帧),所以每个子组件占用一帧,这些贞都会根据gravity属性执行自动对齐 贞布 ...

  6. 解决每次升级Xcode后三方插件失效问题

    其实就是插件里面的UIID没有加新XcodedeUIID 拿常用的Alactraz来说 在Terminal中 un these 2 lines in terminal:1:find ~/Library ...

  7. 十、C# 异常处理

    1.多异常类型 2.捕捉异常 3.常规catch块 4.异常处理的指导原则 5.定义自定义异常   1.多异常类型 代码要引发任何异常,只需为要引发的异常实例实例附加关键字throw作为前缀.具体选择 ...

  8. 你应该了解的5个JavaScript调试技巧

    在某些情况下需要更好的工具,下面是其中的一些佼佼者,我敢肯定你会发现它们的有用之处: 1. debugger; 正如我之前提到的,你可以使用“debugger;”语句在代码中加入强制断点. 需要断点条 ...

  9. Ubuntu 创建快捷方式的方法

    ln -s  /要创建快捷方式的地方/ /创建在哪里/

  10. FASTMM,FASTCODE,FASTMOVE请移步

    http://blog.csdn.net/akof1314/article/details/6524767