Torch vs Theano

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.

时间: 2024-08-28 22:33:39

Torch vs Theano的相关文章

mxnet,theano与torch的简单比较

这两天一直没有去准备这一周的内容,其实我也不是闲着,只不过被另外一个东西吸引了注意力.今天看了一天mxnet的文档,记了一点笔记,有点小收获,笔记会在另一篇随笔里面贴出来. 这篇文章我想来比较一下Theano和mxnet,Torch(Torch基本没用过,所以只能说一些直观的感觉).我主要从以下几个方面来计较它们: 1.学习框架的成本,接口设计等易用性方面. 三个框架的学习成本在我看来是 Theano>Torch>mxnet 因为Torch底层语言是lua,一种类似python和js的脚本语言

AI方向

普通程序员如何转向AI方向 眼下,人工智能已经成为越来越火的一个方向.普通程序员,如何转向人工智能方向,是知乎上的一个问题.本文是我对此问题的一个回答的归档版.相比原回答有所内容增加. 一. 目的 本文的目的是给出一个简单的,平滑的,易于实现的学习方法,帮助 "普通" 程序员踏入AI领域这个门.这里,我对普通程序员的定义是:拥有大学本科知识:平时工作较忙:自己能获取的数据有限.因此,本文更像是一篇 "from the scratch" 的AI入门教程. 二. AI领

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

Google研究员Ilya Sutskever:成功训练LDNN的13点建议 摘要:本文由Ilya Sutskever(Google研究员.深度学习泰斗Geoffrey Hinton的学生.DNNresearch联合创始人)所写,讲述了有关深度学习的见解及实用建议,包括深度学习为什么强大,如何强大,以及训练深度神经网络的tricks. [编者按]本文由Ilya Sutskever(Google研究员.深度学习泰斗Geoffrey Hinton的学生.DNNresearch的联合创始人)受Yiso

(转) Deep Learning Resources

转自:http://www.jeremydjacksonphd.com/category/deep-learning/ Deep Learning Resources Posted on May 13, 2015 Videos Deep Learning and Neural Networks with Kevin Duh: course page NY Course by Yann LeCun: 2014 version, 2015 version NIPS 2015 Deep Learnin

如何提高分布式机器学习系统的执行效率?

翻译自http://weibo.com/p/1001603913581535062112,作者是CMU邢波教授的高徒. 目前有很多开源的分布式机器学习和深度学习系统,例如DMLC,Spark,MLlib,Petuum,parameter server,Caffe,Torch,Theano和TensorFlow等等.然而,如何在集群上高效的执行分布式机器学习过程呢? 这要从机器学习算法的特点说起,机器学习算法与排序或数据库查询等算法不同,它是基于爬山(hill-climbing)的算法,通过多个计

人人都可以做深度学习应用:入门篇

一.人工智能和新科技革命 2017年围棋界发生了一件比较重要事,Master(Alphago)以60连胜横扫天下,击败各路世界冠军,人工智能以气势如虹的姿态出现在我们人类的面前.围棋曾经一度被称为"人类智慧的堡垒",如今,这座堡垒也随之成为过去.从2016年三月份AlphaGo击败李世石开始,AI全面进入我们大众的视野,对于它的讨论变得更为火热起来,整个业界普遍认为,它很可能带来下一次科技革命,并且,在未来可预见的10多年里,深刻得改变我们的生活. 其实,AI除了可以做我们熟知的人脸.

人人都能够做深度学习应用:入门篇

一.人工智能和新科技革命 2017年围棋界发生了一件比較重要事,Master(Alphago)以60连胜横扫天下,击败各路世界冠军.人工智能以气势如虹的姿态出现在我们人类的面前.围棋以前一度被称为"人类智慧的堡垒",现在.这座堡垒也随之成为过去.从2016年三月份AlphaGo击败李世石開始,AI全面进入我们大众的视野,对于它的讨论变得更为火热起来.整个业界普遍觉得,它非常可能带来下一次科技革命,而且,在未来可预见的10多年里,深刻得改变我们的生活. 事实上.AI除了能够做我们熟知的人

Matconvnet学习笔记

Introduction to Matconvnet MatConvNet是实现用于计算机视觉领域的卷积神经网络(CNN)的MATLAB工具箱.自从取得突破性工作以来,CNN在计算机视觉领域有一个重大影响,特别是图像理解,基本上取代了传统图像表示.有许多其他机器学习.深度学习和CNN开源库的存在.一些最受欢迎的:CudaConvNet ,Torch, Theano,Caffe等.MatConvNet是为研究人员提供一个尤其是友好和高效使用的环境,它其中包含许多CNN计算块,如卷积,归一化和池化等

一些技术生词记录

今天想把我不太熟悉的一些词介绍一下,方便大家了解,也方便我查阅 :) 1.开源技术 这个词源于一些软件技术发烧友出于技术展现目的或者说是对软件的一种热爱,将自己辛勤 开发的软件源代码 无私地发布到 互联网 社区上与社会共享,他们坚信, 好的软件 应该是开放的,应该由任何有能力的人参与共同完善,这就是开源技术的理念.       现在比较流行的开源代码共享平台 GitHub ,大家可以去GitHub网址去看看,里面资源很多,但是看不懂代码的小编也只是瞎逛逛,并没有什么实质性收获.(http://y