Abstract

Definitions related to automatic differentiation.

Warning: This is an experimental feature. It has several known bugs. Documentation is very sparse. You probably don't want to use this unless you have the soul of a hero.

Synopsis

val jvp2 'a 'b : (f: a -> b) -> (x: a) -> (x': a) -> (b, b)
val vjp2 'a 'b : (f: a -> b) -> (x: a) -> (y': b) -> (b, a)
val jvp 'a 'b : (f: a -> b) -> (x: a) -> (x': a) -> b
val vjp 'a 'b : (f: a -> b) -> (x: a) -> (y': b) -> a

Description

val jvp2 'a 'b: (f: a -> b) -> (x: a) -> (x': a) -> (b, b)

Jacobian-Vector Product ("forward mode"), producing also the primal result as the first element of the result tuple.

val vjp2 'a 'b: (f: a -> b) -> (x: a) -> (y': b) -> (b, a)

Vector-Jacobian Product ("reverse mode"), producing also the primal result as the first element of the result tuple.

val jvp 'a 'b: (f: a -> b) -> (x: a) -> (x': a) -> b

Jacobian-Vector Product ("forward mode").

val vjp 'a 'b: (f: a -> b) -> (x: a) -> (y': b) -> a

Vector-Jacobian Product ("reverse mode").