(Forward) automatic implicit differentiation in Rust with num-dual 0.12.0
reddit.com·14h·
Discuss: r/rust

A few weeks ago, we released num-dual 0.12.0

num-dual provides data types and helper functions for forward-mode automatic differentiation (AD) in Rust. Unlike reverse-mode AD (backpropagation), forward-mode AD doesn’t require a computational graph and can, therefore, be significantly faster when the number of input variables is moderate. It’s also easy to extend to higher-order derivatives.

The crate offers a simple interface for:

First derivatives (scalar, gradients, Jacobians)

Second derivatives (scalar, partial, Hessians, partial Hessians)

Third derivatives (scalar)

However, the underlying data structures are fully recursive, so you can calculate derivatives up to any order.

Vector-valued derivatives are calculated based on data structures from …

Similar Posts

Loading similar posts...