data DualNumber a { } #
DualNumber { primal :: !a, tangent :: !a }
class Differentiable f { } #

Methods

vjp :: f -> (Input f) -> (Output f, (Output f) -> Input f)
jvp :: f -> (Input f) -> (Input f) -> (Output f, Output f)
Type class for differentiable computations.
negate :: { } #
abs :: { } #
signum :: { } #
fromInteger :: { } #
recip :: { } #
fromRational :: { } #
grad :: (VU.Unbox a, Floating a) { } #
Compute the gradient of a scalar-valued function.
grad' :: (VU.Unbox a, Floating a) { } #
Like grad, but also returns the function value.
jacobian :: (VU.Unbox a, Floating a) { } #
Compute the Jacobian matrix of a vector-valued function.
hessian :: (VU.Unbox a, Floating a) { } #
reverseGrad :: (VU.Unbox a, Floating a) { } #
Reverse-mode gradient for tensor functions.
df :: { } #
vjpTensor :: (VU.Unbox a, Floating a) { } #
df :: { } #
grad_i :: { } #
checkpoint :: (VU.Unbox a, Floating a) { } #
recompute :: (VU.Unbox a, Floating a) { } #
Explicitly mark a computation for recomputation.
numericalGrad :: (VU.Unbox a, Floating a, Ord a) { } #
Compute numerical gradient using finite differences.
df :: { } #
checkGrad :: (VU.Unbox a, Floating a, Ord a) { } #
dAdd :: (Num a, VU.Unbox a) { } #
Differentiable addition.
dSub :: (Num a, VU.Unbox a) { } #
Differentiable subtraction.
dMul :: (Num a, VU.Unbox a) { } #
Differentiable multiplication.
dDiv :: (Fractional a, VU.Unbox a) { } #
Differentiable division.
dNeg :: (Num a, VU.Unbox a) { } #
Differentiable negation.
dAbs :: (Num a, VU.Unbox a) { } #
Differentiable absolute value.
dSign :: (Num a, VU.Unbox a) { } #
Differentiable sign function.
dSqrt :: (Floating a, VU.Unbox a) { } #
Differentiable square root.
dExp :: (Floating a, VU.Unbox a) { } #
Differentiable exponential.
dLog :: (Floating a, VU.Unbox a) { } #
Differentiable natural logarithm.
dPow :: (Floating a, VU.Unbox a) { } #
Differentiable power.
dSin :: (Floating a, VU.Unbox a) { } #
Differentiable sine.
dCos :: (Floating a, VU.Unbox a) { } #
Differentiable cosine.
dTan :: (Floating a, VU.Unbox a) { } #
Differentiable tangent.
dSinh :: (Floating a, VU.Unbox a) { } #
Differentiable hyperbolic sine.
dCosh :: (Floating a, VU.Unbox a) { } #
Differentiable hyperbolic cosine.
dTanh :: (Floating a, VU.Unbox a) { } #
Differentiable hyperbolic tangent.
dSum :: (Num a, VU.Unbox a) { } #
Differentiable sum.
dProduct :: (Num a, VU.Unbox a) { } #
Differentiable product.
dMean :: (Fractional a, VU.Unbox a) { } #
Differentiable mean.
dMatmul :: (Num a, VU.Unbox a) { } #
Differentiable matrix multiplication.
dDot :: (Num a, VU.Unbox a) { } #
Differentiable dot product.
dSoftmax :: (Floating a, Ord a, VU.Unbox a) { } #
Numerically stable softmax.
dLogSoftmax :: (Floating a, Ord a, VU.Unbox a) { } #
Numerically stable log-softmax.
dRelu :: (Num a, Ord a, VU.Unbox a) { } #
ReLU activation function.
dSigmoid :: (Floating a, VU.Unbox a) { } #
Sigmoid activation function.
computeStrides' :: Shape -> [Int] { } #
Compute strides for contiguous layout
unflattenIndex' :: Shape -> Int -> [Int] { } #
Unflatten index to multi-dimensional indices
setIndex :: VU.Unbox a { } #
Set element at index
tensorData :: { } #
norm :: (Floating a, VU.Unbox a) { } #
instance Floating a => Floating (DualNumber a) { }