Skip to main content

Crate chainrules_core

Crate chainrules_core 

Source
Expand description

Backend-agnostic contracts for custom automatic-differentiation rules.

This crate is intentionally not an AD engine. It defines a small common protocol that numerical packages and AD backends can implement without depending on one another.

Modules§

testing
Small validation helpers for custom rules.

Structs§

NoTangent
Marks a value that has no tangent space, such as a discrete configuration.
ZeroTangent
Represents a structurally known zero without allocating a full tangent.

Traits§

Differentiable
Associates a primal value with the type used for its tangent or cotangent.
JvpRule
A forward-mode rule computing a primal output and a Jacobian-vector product.
Pullback
A reverse-mode pullback from an output cotangent to input cotangents.
VjpRule
A reverse-mode rule computing a primal output and a reusable pullback object.