Autograd can automatically differentiate native Python and Numpy
code. It can handle a large subset of Python's features, including
loops, ifs, recursion and closures, and it can even take derivatives
of derivatives of derivatives. It uses reverse-mode differentiation
(a.k.a. backpropagation), which means it can efficiently take
gradients of scalar-valued functions with respect to array-valued
arguments. The main intended application is gradient-based
optimization.