Brings drop-in automatic differentiation to NumPy
Project description
MyGrad is a lightweight library that adds automatic differentiation to NumPy – its only dependency is NumPy! It’s primary goal is to make automatic differentiation an accessible and easy to use across the Python/NumPy ecosystem.
MyGrad introduces a tensor object, which behaves like NumPy’s ndarray object, but that builds a computational graph, which enables MyGrad to perform reverse-mode differentiation (i.e. “backpropagation”). By exploiting NumPy’s mechanisms for ufunc/function overrides, MyGrad’s tensor works “natively” with NumPy’s suite of mathematical functions so that they can be chained together into a differentiable computational graph.
NumPy’s systems for broadcasting operations, producing views of arrays, performing in-place operations, and permitting both “basic” and “advanced” indexing of arrays are all supported by MyGrad to a high-fidelity.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.