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.