Theano is an optimizing compiler and Python library is used for manipulating and evaluating mathematical expressions. The computations in Theano are expressed using NumPy-esque syntax and compiled to run on either CPU or GPU architectures. Theano is used for matrix-valued calculations.