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.

Implementations on Foreign Types§

Source§

impl<A, B, T> Activator<A> for &T
where T: Activator<A, Output = B>,

Source§

type Output = B

Source§

fn activate(&self, rhs: A) -> Self::Output

Source§

impl<X, Y> Activator<X> for dyn Fn(X) -> Y

Source§

type Output = Y

Source§

fn activate(&self, rhs: X) -> Self::Output

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,