Skip to main content

check_function_ad

Function check_function_ad 

Source
pub fn check_function_ad(
    f: &Function,
    args: &[HostArray],
    seed: u64,
) -> Result<(), String>
Expand description

Checks the derivatives of f at args (forward mode against finite differences, reverse mode with the inner-product test) with random tangents and cotangents from seed. Only outputs of type f64 are compared with finite differences.

ยงErrors

Returns a message describing the mismatch, or the error of the transformations.