Deep Learning for NLP

Deep Learning for NLP

Lecture 2:Introduction to Teano

enter link description here

Neural Networks can be expressed as one long function of vector and matrix operations.

(神经网络可以表示为一个向量和矩阵运算的长函数。)

Common Frameworks(常用框架)

  • C/C++

    if you need maximum performance,start from scratch(如果你需要最高性能,那么就从头开始编程吧:)
  • Matlab
  • Caffe

    Ported Matlab’s implementation nets to C.(Caffe是纯粹的C++/CUDA架构,支持命令行、Python和MATLAB接口)

    Mainly used for machine-vision(主要用于机器视觉。)
  • Torch:

    Based on Lua,(基于Lua,)

    Used by a lot of companies(Google Deep Mind,Facebook,IBM)(被很多公司所使用,包括google深度大脑,facebook,IBM等等)
  • Theano

    Python based framework(python基本的框架)

    Main framework used in the research community(主要框架被用于研究团队)

    For comparison: http://fastml.com/torch-vs-theano/

Introduction to Theano

Advantage(优点)

  • Python library with tight integration of Numpy(python库Numpy的紧密集成)

    Easy syntax for matrix operations(简单的矩阵运算语法)
  • Transparent use of GPU(speed-up of up to 140x)(透明的GPU使用(加速140x))
  • Efficient symbolic differentiation(Theano computes the gradient)(有效的符号微分(Theano计算梯度))
  • Speed and stability optimizations(速度和稳定性优化)
  • Calculations are dynamically mapped to C code(计算动态映射到C代码)

    We do our computations as fast as we would have written it in C (我们有跟我们用C代码写出来的程序一样快的运算速度)

    Great performance(>10 faster than Java in my experiments)(伟大的性能(比在我的实验中用Java还要快10倍))

Disadvantages(缺点)

  • Debugging is really hard(调试很困难)

Some note on the installation of Theano(Theano安装的一些注意事项)

  • Theano utilizes BLAS (Basic Linear Algebra Subprograms)(Theano利用BLAS(基本线性代数的子程序))

    Building blocks for fast vector and matrix operations(速度向量和矩阵运算的构建块)

    Often written in Fortran, sometimes in Assembler(经常用Fortran编写,但有时候用Assembler)
  • For performance optimization install a BLAS package(为优化性能安装一个BLAS包)
  • Benchmark different BLAS packages(不同BLAS包的基准不同)
  • I use a manually compiled OpenBlas implementation(我使用一个手动编译OpenBlas来实现)

    Installation notes: http://deeplearning.net/software/theano/install_ubuntu.html

Theano – Flow(Theano流程图)

The execution of a Theano script is a bit different(Theano脚本的执行略有不同)

Theano-Computation Graph(Theano计算图)

import theano
import theano.tensor as T

a=T.fvector()
b=T.fvector()
c=T.fmatrix()

res1=a+b
res2=T.dot(res1,c)

Deep Learning for NLP学习翻译笔记(2)的更多相关文章

  1. (Stanford CS224d) Deep Learning and NLP课程笔记(一):Deep NLP

    Stanford大学在2015年开设了一门Deep Learning for Natural Language Processing的课程,广受好评.并在2016年春季再次开课.我将开始这门课程的学习 ...

  2. 【转】Deep Learning(深度学习)学习笔记整理系列之(一)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0  2013-0 ...

  3. Deep Learning(深度学习)学习笔记整理系列之(五)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  4. Deep Learning(深度学习)学习笔记整理系列之(八)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  5. Deep Learning(深度学习)学习笔记整理系列之(七)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  6. Deep Learning(深度学习)学习笔记整理系列之(六)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  7. Deep Learning(深度学习)学习笔记整理系列之(四)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  8. Deep Learning(深度学习)学习笔记整理系列之(三)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  9. Deep Learning(深度学习)学习笔记整理系列之(二)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

随机推荐

  1. Nginx 在安装入门

    1.首先需要安装必要的库,PCRE,zlib sudo apt-get install libpcre3 libpcre3-dev 假设找不到文件的话就下载源文件进行安装. 2.解压下载的nginx源 ...

  2. 《think in python》学习-2

    高能提示:本文大量编程术语与释义,一些释义如有偏差恕不讨论. 变量,表达式 数据类型: print 4 #打印整数 int print 4.1#打印浮点数 float print "hell ...

  3. SQL中去除某字段中的某个字符语法

    update S_ENTERPRISE set DAY_PROCESS=replace(DAY_PROCESS,'吨','') where DAY_PROCESS like '%吨%'

  4. SQL Server数据库---》基础

    SQL Server:只是操作数据库的一个工具(这种工具,只是提供一个界面化的方式让用户方便操作数据库) 开启服务:点击:我的电脑(计算机)--管理--服务和应用程序--服务--开启SQL Serve ...

  5. Linux学习之sed命令详解

    概述 sed是stream editor的简称,也就是流编辑器.它一次处理一行内容,处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(pattern space),接着用sed命令处理缓冲区 ...

  6. RapidMiner的基本使用(一个医疗数据的简单决策树算法分析)

    RapidMiner的基本使用(一个医疗数据的简单决策树算法分析) RapidMiner的基本使用(一个医疗数据的简单决策树算法分析) 需要分析的文件: 右键分别创建读取excel数据,选择属性,设置 ...

  7. 优盘(U 盘) 采用TLC, MLC, SLC芯片 的区别 与使用寿命

    最近一直在看大家在讨论sandisk,pny,金士顿等大厂都开始用tlc的芯片问题,让大家基本都不敢用U盘存数据了按照之前的擦写参数TLC        1000次MLC       10000次SL ...

  8. Unix/Linux环境C编程入门教程(17) Gentoo LinuxCCPP开发环境搭建

    1. Gentoo Linux是一套通用的.快捷的.完全免费的Linux发行,它面向开发人员和网络职业人员.与其他发行不同的是,Gentoo Linux拥有一套先进的包管理系统叫作Portage.在B ...

  9. Xcode 4.1~4.6 + iOS 5、iOS 6免证书(iDP)开发+真机调试+生成IPA全攻略

    原创文章,欢迎分享:未经许可,不得转载:版权所有,侵权必究 开发环境使用的是目前为止最新的稳定版软件:Mac OS X Lion 10.7 + Xcode 4.1 目前Xcode 4.2 Previe ...

  10. 转载文章:Windows Azure 七月份更新:SQL 数据库、流量管理器、自动伸缩、虚拟机

    转载文章:Windows Azure 七月份更新:SQL 数据库.流量管理器.自动伸缩.虚拟机 今天上午,我们发布了一些重大的 Windows Azure 更新.这些新的增强功能包括: · SQL 数 ...