Trait Activator

Source
pub trait Activator<T> {
    type Output;

    // Required method
    fn activate(&self, input: T) -> Self::Output;
}
Expand description

The Activator trait defines a method for applying an activation function to an input tensor.

Required Associated Types§

Required Methods§

Source

fn activate(&self, input: T) -> Self::Output

Applies the activation function to the input tensor.

Implementors§

Source§

impl<U> Activator<U> for Linear

Source§

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

Source§

type Output = <U as ReLU>::Output

Source§

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

Source§

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

Source§

type Output = <U as Tanh>::Output

Source§

impl<U, V, F, S, D> Activator<U> for LayerBase<F, S, D>
where F: Activator<U, Output = V>, D: Dimension, S: RawData,

Source§

impl<X, Y, F> Activator<X> for F
where F: Fn(X) -> Y,