* package:inf-backprop

Differentiable logging multiplication function.

Examples of usage

>>> import Control.Arrow (runKleisli)

>>> import Control.Monad.Logger (runStdoutLoggingT)

>>> import InfBackprop (call)
>>> runStdoutLoggingT $ runKleisli (call (*)) (6, 7)
[Info] Calculating multiplication of 6 and 7 => 42
42
Product binnary operation

Examples of usage

>>> import Prelude (Float)

>>> import InfBackprop (call, derivative)

>>> call (*) (2, 3) :: Float
6.0
>>> import Debug.SimpleExpr.Expr (variable)

>>> x = variable "x"

>>> y = variable "y"

>>> derivative (*) (x, y)
(1·y,1·x)
Categorical generalization of
bimap :: (a1 -> b1) -> (a2 -> b2) -> (p a1 a2 -> p c1 c2)
borrowed from arrows.
Power binary differentiable operation.

Examples of usage

>>> import Prelude (Float)

>>> import NumHask (half)

>>> import InfBackprop (call, derivative)

>>> call (**) (0.5, 9) :: Float
3.0
>>> import Debug.SimpleExpr.Expr (variable)

>>> x = variable "x"

>>> n = variable "n"

>>> derivative (**) (n, x)
(1·(n·(x^(n-1))),1·((x^n)·log(x)))