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. Java操作XML文件 dom4j 篇

    在项目中,我们很多都用到了xml文件,无论是参数配置还是与其它系统的数据交互.今天就来讲一下Java 中使用dom4j来操作XML文件. 我们需要引入的包: //文件包 import java.io. ...

  2. js——DOM操作(二)

    表格属性: tHead:表格头 tBodies:表格正文 tFoot:表格尾 rows:行 cells:列 表单操作: <form id="form1"> <in ...

  3. leetcode Maximum Depth of Binary Tree python

    # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = ...

  4. leetcode 3Sum Closest python

    class Solution(object): def threeSumClosest(self, nums, target): """ :type nums: List ...

  5. python3.5之mysql扩展

    最近在学习廖雪峰的python3的教程,这是官方http://www.liaoxuefeng.com/,建议大家想学习python的同学可以去看看,真的是在网上能找到的最好文本教程,没有之一 在廖老实 ...

  6. iframe自适应高度的问题

    最近工作中遇到了iframe自适应高度的问题. 如果在iframe中写定高度height的属性,并且iframe中内容高度小于给定的height时,会在手机浏览器中莫名的产生下拉框,造成体验度下降. ...

  7. Android TextView文字超出一屏不能显示其它的文字 解决方案

    在android上面让TextView 过多的文字实现有滚动条,之前想简单了以为设置TextView的属性就可以实现,结果还是需要ScrollView配合使用,才能达到滚动条的效果有两种方式实现, 一 ...

  8. SD和SDHC和SDXC卡的区别是什么

    SD卡,SDHC卡,SDXC卡区别在规格不一样,SD卡最大支持2GB容量,SDHC 最大支持32GB容量,SDXC 最大支持2TB(2048GB)容量,支持SDXC卡的数码设备是兼容支持SD卡与SDH ...

  9. flex4 日期类型字符串转日期类型(string转Date)(转)

    mysql数据库中存储的日期类型通过PHP返回到flex端为字符串类型,这样在flex中进行处理时就必须要将字符串转化为Date类型.如果仅仅是 "年/月/日" 的组合,而没有涉及 ...

  10. cloud computing platform,virtual authentication encryption

    Distributed Management Task Forcevirtual Ethernet port aggregator encryption,authenticating,local ac ...