autograd
Efficiently computes derivatives of NumPy code.
What is autograd?
Efficiently computes derivatives of NumPy code.
Overview of autograd
What it is
Autograd is a software library that automatically differentiates native Python and NumPy code. It can handle a large subset of Python's features, including loops, ifs, recursion and closures. It supports reverse-mode differentiation (backpropagation) and forward-mode differentiation, and the two can be composed arbitrarily. The main intended application is gradient-based optimization.
Key features
- Automatically computes derivatives of native Python and NumPy code.
- Supports reverse-mode differentiation (backpropagation) and forward-mode differentiation.
- Can handle loops, ifs, recursion, and closures.
- Can take derivatives of derivatives of derivatives.
- Efficiently computes gradients of scalar-valued functions with respect to array-valued arguments.
- Provides
elementwise_gradfor functions that vectorize over inputs.
Use cases
- Gradient-based optimization.
- Training neural networks (simple, convolutional, recurrent, LSTM, Neural Turing Machine).
- Backpropagating through a fluid simulation.
- Variational inference in Bayesian neural networks.
- Gaussian process regression.
- Pure Python MCMC packages (e.g., Sampyl with HMC and NUTS).
Getting started
Install Autograd using Pip: shell pip install autograd Some features require SciPy, which can be installed separately or as an optional dependency: shell pip install 'autograd[scipy]'
License and pricing
The license is MIT. The software is open source.
Based on the project's public README and repository metadata.