pub trait ActivationFunc: Clone + Debug {
    fn func(x: f64) -> f64;
    fn func_grad(x: f64) -> f64;
    fn func_grad_from_output(y: f64) -> f64;
    fn func_inv(x: f64) -> f64;
}
Expand description

Trait for activation functions in models.

Required Methods

The activation function.

The gradient of the activation function.

The gradient of the activation function calculated using the output of the function. Calculates f’(x) given f(x) as an input

The inverse of the activation function.

Implementors