Theano
Theano was developed for deep learning, but it is not actually a deep learning library; it is a Python library for scientific computing. The documentation is available at http://deeplearning.net/software/theano/. There are several characteristics introduced on the page such as the use of a GPU, but the most striking feature is that Theano supports computational differentiation or automatic differentiation, which ND4J, the Java scientific computing library, doesn't support. This means that, with Theano, we don't have to calculate the gradients of model parameters by ourselves. Theano automatically does this instead. Since Theano undertakes the most complicated parts of the algorithm, implementations of math expressions can be less difficult.
Let's see how Theano computes gradients. To begin with, we need to install Theano on the machine. Installation can be done just by using pip install Theano
or easy_install Theano
. Then, the following are the lines to import and use Theano:
import...