Trait Activate

Source
pub trait Activate<T> {
    type Output;

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

The Activate 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> Activate<U> for Linear

Source§

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

Source§

type Output = <U as ReLU>::Output

Source§

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

Source§

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

Source§

type Output = <U as Tanh>::Output