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初探的更多相关文章

  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. 把cygwin加入右键菜单

    第一步:修改windows注册表 1·开始->运行(或者win键+R),输入REGEDIT,回车,打开注册表编辑器: 2·找到HKEY_CLASSES_ROOT\Directory\Backgr ...

  2. C# div布局

    本文讲解使用DIV+CSS布局最基本的内容,读完本文你讲会使用DIV+CSS进行简单的页面布局. 转载请标明:http://www.kwstu.com/ArticleView/divcss_20139 ...

  3. VisualStudio2013&VS2015内置SQLServer入门 (三)

    关于LocalDB的部署(publish): 使用本机做服务器(目测不可行) 双击项目的Properties-->Publish-->Application Files,你会发现没有.md ...

  4. 使用require.js时,解决AMD封装jquery1.4.1的问题。

    require.config({ baseUrl: "js/", paths: { "jquery": "jquery-1.4.1.min" ...

  5. 优秀Android开源项目

    开源项目汇总: Trinea/android-open-project · GitHub 包含个性化控件.工具库.优秀项目.开发及测试工具等 优秀完整项目: 1.Google I/O Android ...

  6. An erroroccurred while filtering resources

    maven报错: maven An error occurred while filtering resources Maven -> Update Project... resolved th ...

  7. magento前台访问错误

    前台访问出现错误 General error: 145 Table './dbname/tablename' ismarked as crashed and should be repaired 解决 ...

  8. 学习WindowsPhone 2013/12/22

    菜鸟一枚,只能边看别人的博客变学习来提升自己,参考博客内容:http://blog.csdn.net/column/details/wp-comming.html?page=3 ,稍微看了一下,写的还 ...

  9. Android Fragment基础及使用

    同一个app内的界面切换 用Fragment比较合适,因为Activity比较重量级 Fragment 轻量级,切换灵活 --------------------------------------- ...

  10. 如何使用ASP.NET Web API OData在Oracle中使用Entity Framework 6.x Code-First方式开发 OData V4 Service

    环境: Visual Studio 2013 + .Net Framework 4.5.2 1.新建项目 2.安装OData,ODP.NET 安装的包: 下面是部分代码: using System; ...