num package:backprop

Provides the exact same API as Numeric.Backprop, except requiring Num instances for all types involved instead of Backprop instances. This was the original API of the library (for version 0.1). Num is strictly more powerful than Backprop, and is a stronger constraint on types than is necessary for proper backpropagating. In particular, fromInteger is a problem for many types, preventing useful backpropagation for lists, variable-length vectors (like Data.Vector) and variable-size matrices from linear algebra libraries like hmatrix and accelerate. However, this module might be useful in situations where you are working with external types with Num instances, and you want to avoid writing orphan instances for external types. If you have external types that are not Num instances, consider instead Numeric.Backprop.External. If you need a Num instance for tuples, you can use the orphan instances in the <https://hackage.haskell.org/package/NumInstances NumInstances> package (in particular, Data.NumInstances.Tuple) if you are writing an application and do not have to worry about orphan instances. See Numeric.Backprop for fuller documentation on using these functions.
Provides the exact same API as Prelude.Backprop, except requiring Num instances for all types involved instead of Backprop instances.
A newtype wrapper over an instance of Num that gives a free Backprop instance. Useful for things like DerivingVia, or for avoiding orphan instances.
Newtype wrapper around a v a for Vector v a, that gives a more efficient Backprop instance for long vectors when a is an instance of Num. The normal Backprop instance for vectors will map zero or one over all items; this instance will completely ignore the contents of the original vector and instead produce a new vector of the same length, with all 0 or 1 using the Num instance of a (essentially using zeroVecNum and oneVecNum instead of zeroVec and oneVec). add is essentially the same as normal, but using + instead of the type's add.
add for instances of Num.
one for instances of Num. Is lazy in its argument.
one for instances of Vector when the contained type is an instance of Num. Is potentially more performant than oneVec when the vectors are larger. See NumVec for a Backprop instance for Vector instances that uses this for one.
zero for instances of Num. Is lazy in its argument.
zero for instances of Vector when the contained type is an instance of Num. Is potentially more performant than zeroVec when the vectors are larger. See NumVec for a Backprop instance for Vector instances that uses this for zero.
If a type has a Num instance, this is the canonical AddFunc.
ZeroFuncs for every item in a type level list based on their Num instances
If a type has a Num instance, this is the canonical OneFunc.
ZeroFuncs for every item in a type level list based on their Num instances
If a type has a Num instance, this is the canonical ZeroFunc.
ZeroFuncs for every item in a type level list based on their Num instances
Op for signum