Skip to main content

backward

Function backward 

Source
pub fn backward(
    forward: &str,
    output: &str,
    cotangent: &str,
    wrt: &[&str],
) -> Result<Backward, VjpRefusal>
Expand description

The backward pass of forward (a program whose ## Main holds tensor statements) for the loss Σ output ⊙ cotangent, giving the gradient of every tensor in wrt. cotangent must be a declared tensor of output’s shape. A tensor in wrt the loss does not depend on gets a zero gradient.