Trait dfdx::tensor_ops::Backward

source ·
pub trait Backward<E, D: Storage<E>>: HasErr {
    // Required method
    fn try_backward(self) -> Result<Gradients<E, D>, Self::Err>;

    // Provided method
    fn backward(self) -> Gradients<E, D> { ... }
}
Expand description

Runs backprop algorithm with all operations contained in the tape that t has.

This function takes ownership of self and returns Gradients.

Required Methods§

source

fn try_backward(self) -> Result<Gradients<E, D>, Self::Err>

Fallible version of Backward::backward

Provided Methods§

source

fn backward(self) -> Gradients<E, D>

Runs backprop

Implementors§

source§

impl<E: 'static + Clone, D: OneFillStorage<E>> Backward<E, D> for Tensor<Rank0, E, D, OwnedTape<E, D>>