Trait revonet::neuro::ActivationFunction [] [src]

pub trait ActivationFunction: Debug {
    fn compute(&self, x: f32) -> f32;
fn compute_static(x: f32) -> f32;
fn new() -> Self; }

Trait to generalize behaviour of activation function.

Required Methods

Compute activation function value using given argument. Implementation should call ActivationFunction::compute_static to avoid duplication.

Arguments:

  • x - value of argument of activation function.

Compute activation function value using given argument. This is a static variant of the function compute.

Arguments:

  • x - value of argument of activation function.

Construct an activation function instance.

Implementors