hydra.differentiation module

Source-to-source automatic differentiation for Float64 terms.

hydra.differentiation.differentiate_binary(bfname: Name, a: Term, b: Term, da: Term, db: Term) Term

Differentiate a binary primitive application given both arguments and their derivatives.

hydra.differentiation.differentiate_function(term: Term) Term

Differentiate a function term (Float64 -> Float64) with respect to its parameter.

hydra.differentiation.differentiate_term(dx: Name, term: Term) Term

Differentiate a term with respect to a named variable.

hydra.differentiation.gradient(type_name: Name, vars: Sequence[Name], term: Term) Term

Compute the gradient of a term as a record of partial derivatives.

hydra.differentiation.primitive_derivative(name: Name) object

Look up the derivative of a unary Float64 primitive.