Grad
Types
DualNumber { primal :: !a, tangent :: !a }
Type Classes
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.
Functions
Compute the gradient of a scalar-valued function.
Compute the Jacobian matrix of a vector-valued function.
Reverse-mode gradient for tensor functions.
Explicitly mark a computation for recomputation.
Compute numerical gradient using finite differences.
Differentiable addition.
Differentiable subtraction.
Differentiable multiplication.
Differentiable division.
Differentiable negation.
Differentiable absolute value.
Differentiable sign function.
Differentiable square root.
Differentiable exponential.
Differentiable natural logarithm.
Differentiable power.
Differentiable sine.
Differentiable cosine.
Differentiable tangent.
Differentiable hyperbolic sine.
Differentiable hyperbolic cosine.
Differentiable hyperbolic tangent.
Differentiable sum.
Differentiable product.
Differentiable mean.
Differentiable matrix multiplication.
Differentiable dot product.
Numerically stable softmax.
Numerically stable log-softmax.
ReLU activation function.
Sigmoid activation function.
Compute strides for contiguous layout
Unflatten index to multi-dimensional indices
Set element at index