Torch vs Theano

Recently we took a look at Torch 7 and found its data ingestion facilities less than impressive. Torch’s biggest competitor seems to be Theano, a popular deep-learning framework for Python.

It seems that these two have been having “who is faster” competition going for a few years now. It’s been documented in the following papers:

  1. J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, R. Pascanu, G. Desjardins, J. Turian, Y. Bengio - Theano: a CPU and GPU Math Expression Compiler PDF

  2. Ronan Collobert, Koray Kavukcuoglu, Clement Farabet - Torch7: A Matlab-like Environment for Machine Learning PDF

  3. Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, James Bergstra, Ian Goodfellow, Arnaud Bergeron, Nicolas Bouchard, David Warde-Farley, Yoshua Bengio - Theano: new features and speed improvements arxiv


A figure from the Torch7 paper [2]. Torch - red, Theano - green. Higher is better.

And a quote from [3]:

Bergstra et al.(2010) showed that Theano was faster than many other tools available at the time, including Torch5. The following year, Collobert et al.(2011) showed that Torch7 was faster than Theano on the same benchmarks.

The results in the last paper are mixed, if you’re wondering.

The latest act in this friendly competition, which can be seen as one between Bengio’s and LeCun’s groups, appears to be about FFT convolutions, first available in Theano and recently open-sourced by Facebook in Torch.

As a side note, the press really jumped at this second event with headlines about turbo-charging deep learning and the like. Probably the allure of Facebook and deep learning in the same sentence.

Let’s look at convnet benchmarks by Soumith Chintala. He is a Facebook/Torch guy and yet the Theano’s convolution layer is reported to be the fastest at the time of writing. Waiting for those fbfft results.

Anyway, speed isn’t everything and there’s more to life than FFT convolutions. From a developer’s perspective minor differences in speed are less important than other factors, like ease of use. Which leads us to what Soumith had to say about Torch, according to VentureBeat:

It’s like building some kind of electronic contraption or, like, a Lego set. You just can plug in and plug out all these blocks that have different dynamics and that have complex algorithms within them.

At the same time Torch is actually not extremely difficult to learn — unlike, say, the Theano library.

We’ve made it incredibly easy to use. We introduce someone to Torch, and they start churning out research really fast.

Well, you already know our opinion about the “incredibly easy” bit. Torch is not really a Matlab-like environment. Matlab, with all its shortcomings, is a very well polished piece of software with examplary documentation. Torch, on the other hand, is rather rough around the edges.

Besides the language gap, that’s one of the reasons that you don’t see that much Torch usage apart from Facebook and DeepMind. At the same time libraries using Theano have been springing up like mushrooms after a rain (you might want to take a look at Sander Dieleman’s Lasagne and at blocks). It is hard to beat the familiar and rich Python ecosystem.

Theano tutorials

P.S. What about Caffe?

Caffe is a fine and very popular piece of software. How does it compare with Torch and Theano? Here’s sieisteinmodel’s answer from Reddit:

Caffe has a pretty different target. More mass market, for people who want to use deep learning for applications. Torch and Theano are more tailored towards people who want to use it for research on DL itself.

Torch vs Theano的更多相关文章

  1. mxnet,theano与torch的简单比较

    这篇文章我想来比较一下Theano和mxnet,Torch(Torch基本没用过,所以只能说一些直观的感觉).我主要从以下几个方面来计较它们: 1.学习框架的成本,接口设计等易用性方面. 三个框架的学 ...

  2. Summary on deep learning framework --- Theano && Lasagne

     Summary on deep learning framework --- Theano && Lasagne 2017-03-23 1. theano.function outp ...

  3. 普通程序员如何转向AI方向

    眼下,人工智能已经成为越来越火的一个方向.普通程序员,如何转向人工智能方向,是知乎上的一个问题.本文是我对此问题的一个回答的归档版.相比原回答有所内容增加. 一. 目的 本文的目的是给出一个简单的,平 ...

  4. AI方向

    普通程序员如何转向AI方向   眼下,人工智能已经成为越来越火的一个方向.普通程序员,如何转向人工智能方向,是知乎上的一个问题.本文是我对此问题的一个回答的归档版.相比原回答有所内容增加. 一. 目的 ...

  5. (转) Deep Learning Resources

    转自:http://www.jeremydjacksonphd.com/category/deep-learning/ Deep Learning Resources Posted on May 13 ...

  6. 学习Data Science/Deep Learning的一些材料

    原文发布于我的微信公众号: GeekArtT. 从CFA到如今的Data Science/Deep Learning的学习已经有一年的时间了.期间经历了自我的兴趣.擅长事务的探索和试验,有放弃了的项目 ...

  7. 百度Paddle会和Python一样,成为最流行的深度学习引擎吗?

    PaddlePaddle会和Python一样流行吗? 深度学习引擎最近经历了开源热.2013年Caffe开源,很快成为了深度学习在图像处理中的主要框架,但那时候的开源框架还不多.随着越来越多的开发者开 ...

  8. Google研究员Ilya Sutskever:成功训练LDNN的13点建议

    Google研究员Ilya Sutskever:成功训练LDNN的13点建议 摘要:本文由Ilya Sutskever(Google研究员.深度学习泰斗Geoffrey Hinton的学生.DNNre ...

  9. Popular Deep Learning Tools – a review

    Popular Deep Learning Tools – a review Deep Learning is the hottest trend now in AI and Machine Lear ...

随机推荐

  1. 安卓SQLite数据库操作,半小时开发新闻管理系统,纯干货

    本教程致力于可以快速的学习安卓软件开发,希望能通过一系列自己手写的教程,帮助正在学习或想要学习安卓开发的同仁. 本教程由今日头条-全栈攻城狮号首发,都是一个字一个字码的.请尊重劳动成果,转载请注明出处 ...

  2. Java类加载及实例化的调用顺序

    标题起得略拗口,大概意思就是说在一个Java类中,域和构造方法的调用顺序. 1. 没有继承的情况 单独一个类的场景下,初始化顺序为依次为 静态数据,继承的基类的构造函数,成员变量,被调用的构造函数. ...

  3. Magento的布局(Layout),块(Block)和模板(Template)

    public function indexAction() { //remove our previous echo //echo 'Hello Index!'; $this->loadLayo ...

  4. js基础1

    一.JavaScript 不同于Java 有三部分组成 核心(ECMAScript) 文档对象模型(DOM) 浏览器对象模型(BOM) 二.var 是定义数据前加的前缀   三.弹出 alert( ) ...

  5. 20160331javaweb 之JSP page 指令

  6. mysqldump: unknown option '--no-beep'

    想要备份mysql数据库时,输入mysqldump命令出现如题所示的错误,在网上找了好久,终于从一个帖子上得到了一些提示,就动手试了下,嘿  还真成了!! mysqldump --no-default ...

  7. Dao模型设计(基于Dao与Hebernate框架)

    以前没有Dao设计模型之前,一般都是这样的流程: ①先设计实体对象 学生对象: package com.itheima.domain; import java.io.Serializable; imp ...

  8. C++类继承内存布局(三)

    参考:http://blog.csdn.net/jiangyi711/article/details/4890889# (三)成员函数 类X中每一个非静态成员函数都会接受一个特殊的隐藏参数——this ...

  9. 24种设计模式--原型模式【Prototype Pattern】

    今天我们来讲原型模式,这个模式的简单程度是仅次于单例模式和迭代器模式,非常简单,但是要使用好这个模式还有很多注意事项.我们通过一个例子来解释一下什么是原型模式. 现在电子账单越来越流行了,比如你的信用 ...

  10. Mac apache配置问题解决

    AH00526: Syntax error on line 20 of /private/etc/apache2/extra/httpd-mpm.conf: Invalid command 'Lock ...