Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Vectored AD #2
It would be nice to invert our current control mechanism so that instead of having
grad :: (Traversable f, Num a) => (forall s. Mode s => f (AD s a) -> AD s a) -> f a -> f a
we could have (also factoring in issue 1):
type RAD = AD Reverse
grad :: (Traversable f, Num a) => (forall s. RAD f s a -> RAD Scalar s a) -> f a -> f a
This can then be used to allow us to unify instance heads for the various UU, UF, FU, FF arguments, allow vgrad to take multiple 'containers' worth of AD variables, and it can act as a path to support Taylor Series-of-Matrices rather than Matrices-of-Taylor Series for better ability to leverage traditional BLAS packages, etc.