Trait ActivateGradient

Source
pub trait ActivateGradient<T>: Activate<T> {
    type Input;
    type Delta;

    // Required method
    fn activate_gradient(&self, input: Self::Input) -> Self::Delta;
}
Expand description

The ActivateGradient trait extends the Activate trait to include a method for computing the gradient of the activation function.

Required Associated Types§

Required Methods§

Source

fn activate_gradient(&self, input: Self::Input) -> Self::Delta

compute the gradient of some input

Implementors§

Source§

impl<U> ActivateGradient<U> for Linear

Source§

impl<U> ActivateGradient<U> for ReLU
where U: ReLU,

Source§

type Input = U

Source§

type Delta = <U as ReLU>::Output

Source§

impl<U> ActivateGradient<U> for Sigmoid
where U: Sigmoid,

Source§

type Input = U

Source§

type Delta = <U as Sigmoid>::Output

Source§

impl<U> ActivateGradient<U> for Tanh
where U: Tanh,

Source§

type Input = U

Source§

type Delta = <U as Tanh>::Output