Trait ActivatorGradient

Source
pub trait ActivatorGradient<T>: Activator<T> {
    type Input;
    type Delta;

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

The ActivatorGradient trait extends the Activator 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> ActivatorGradient<U> for Linear

Source§

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

Source§

type Input = U

Source§

type Delta = <U as ReLU>::Output

Source§

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

Source§

type Input = U

Source§

type Delta = <U as Sigmoid>::Output

Source§

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

Source§

type Input = U

Source§

type Delta = <U as Tanh>::Output

Source§

impl<U, F, S, D> ActivatorGradient<U> for LayerBase<F, S, D>
where F: ActivatorGradient<U>, D: Dimension, S: RawData,