Theano: A CPU and GPU Math Compiler in Python
Authors:
Open Access
- 1 January 2010
- conference paper
- Published by NumFOCUS - Insight Software Consortium (ITK) in Proceedings of the Python in Science Conference
- p. 18-24
Abstract
Theano is a compiler for mathematical expressions in Python that combines the convenience of NumPy's syntax with the speed of optimized native machine language. The user composes mathematical expressions in a high-level description that mimics NumPy's syntax and semantics, while being statically typed and functional (as opposed to imperative). These expressions allow Theano to provide symbolic differentiation. Before performing computation, Theano optimizes the choice of expressions, translates them into C++ (or CUDA for GPU), compiles them into dynamically loaded Python modules, all automatically. Common machine learning algorithms implemented with Theano are from 1.6× to 7.5× faster than competitive alternatives (including those implemented with C/C++, NumPy/SciPy and MATLAB) when compiled for the CPU and between 6.5× and 44× faster when compiled for the GPU. This paper illustrates how to use Theano, outlines the scope of the compiler, provides benchmarks on both CPU and GPU processors, and explains its overall design.Keywords
This publication has 2 references indexed in Scilit:
- Why Modern CPUs Are Starving and What Can Be Done about ItComputing in Science & Engineering, 2010
- Algorithm 679: A set of level 3 basic linear algebra subprograms: model implementation and test programsACM Transactions on Mathematical Software, 1990