ad-3.3.1: Automatic Differentiation

Portabilitynon-portable
Stabilityexperimental
Maintainerekmett@gmail.com
Safe HaskellNone

Numeric.AD.Variadic.Kahn

Contents

Description

Variadic combinators for reverse-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

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

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

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 Kahn a) [a] (a, [a]) a 
(Num a, Grad i o o' a) => Grad (AD Kahn a -> i) (a -> o) (a -> o') a