Trait Gradient

Source
pub trait Gradient<T> {
    type Gradient;

    // Required method
    fn grad(&self, args: T) -> Self::Gradient;
}

Required Associated Types§

Required Methods§

Source

fn grad(&self, args: T) -> Self::Gradient

Implementors§

Source§

impl<T> Gradient<Variable<T>> for Variable<T>
where T: Num,

Source§

impl<T> Gradient<T> for Constant<T>
where T: Default,

Source§

impl<T> Gradient<T> for Dual<T>
where T: Default + Gradient<T>,