ad-1.5.0.2: Automatic Differentiation

Portabilitynon-portable
Stabilityexperimental
Maintainerekmett@gmail.com
Safe HaskellNone

Numeric.AD.Variadic.Sparse

Contents

Description

Variadic combinators for sparse forward mode automatic differentiation.

Unfortunately, variadicity comes at the expense of being able to use quantification to avoid sensitivity confusion, so be careful when counting the number of lift you use when taking the gradient of a function that takes gradients!

Synopsis

Unsafe Variadic Gradient

class Num a => Grad i o o' a | i -> a o o', o -> a i o', o' -> a i oSource

Instances

Num a => Grad (AD Sparse a) [a] (a, [a]) a 
Grad i o o' a => Grad (AD Sparse a -> i) (a -> o) (a -> o') a 

vgrad :: Grad i o o' a => i -> oSource

vgrad' :: Grad i o o' a => i -> o'Source

class Num a => Grads i o a | i -> a o, o -> a iSource

Instances

Grads i o a => Grads (AD Sparse a -> i) (a -> o) a 
Num a => Grads (AD Sparse a) (Cofree [] a) a 

vgrads :: Grads i o a => i -> oSource