Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. ++Theano features++:
- tight integration with NumPy – Use numpy.ndarray in Theano-compiled functions.
- transparent use of a GPU– Perform data-intensive computations much faster than on a CPU.
- efficient symbolic differentiation – Theano does your derivatives for functions with one or many inputs.
- speed and stability optimizations – Get the right answer for log(1+x) even when x is really tiny.
- dynamic C code generation – Evaluate expressions faster.
- extensive unit-testing and self-verification – Detect and diagnose many types of errors.
What does it do that they don’t?
Theano is a Python library and optimizing compiler for manipulating and evaluating expressions, especially matrix-valued ones. Manipulation of matrices is typically done using the numpy package, so what does Theano do that Python and numpy do not?
- execution speed optimizations: Theano can use g++ or nvcc to compile parts your expression graph into CPU or GPU instructions, which run much faster than pure Python.
- symbolic differentiation: Theano can automatically build symbolic graphs for computing gradients.
- stability optimizations: Theano can recognize [some] numerically unstable expressions and compute them with more stable algorithms.