Enum fann_sys::fann_activationfunc_enum [−][src]
#[repr(C)]pub enum fann_activationfunc_enum { FANN_NONE, FANN_LINEAR, FANN_THRESHOLD, FANN_THRESHOLD_SYMMETRIC, FANN_SIGMOID, FANN_SIGMOID_STEPWISE, FANN_SIGMOID_SYMMETRIC, FANN_SIGMOID_SYMMETRIC_STEPWISE, FANN_GAUSSIAN, FANN_GAUSSIAN_SYMMETRIC, FANN_GAUSSIAN_STEPWISE, FANN_ELLIOTT, FANN_ELLIOTT_SYMMETRIC, FANN_LINEAR_PIECE, FANN_LINEAR_PIECE_SYMMETRIC, FANN_SIN_SYMMETRIC, FANN_COS_SYMMETRIC, FANN_SIN, FANN_COS, }
The activation functions used for the neurons during training. The activation functions
can either be defined for a group of neurons by fann_set_activation_function_hidden
and
fann_set_activation_function_output
, or it can be defined for a single neuron by
fann_set_activation_function
.
The steepness of an activation function is defined in the same way by
fann_set_activation_steepness_hidden
, fann_set_activation_steepness_output
and
fann_set_activation_steepness
.
The functions are described with functions where:
-
x is the input to the activation function,
-
y is the output,
-
s is the steepness and
-
d is the derivation.
Variants
FANN_NONE
Neuron does not exist or does not have an activation function.
FANN_LINEAR
Linear activation function.
-
span: -inf < y < inf
-
y = xs, d = 1s
-
Can NOT be used in fixed point.
FANN_THRESHOLD
Threshold activation function.
-
x < 0 -> y = 0, x >= 0 -> y = 1
-
Can NOT be used during training.
FANN_THRESHOLD_SYMMETRIC
Threshold activation function.
-
x < 0 -> y = 0, x >= 0 -> y = 1
-
Can NOT be used during training.
FANN_SIGMOID
Sigmoid activation function.
-
One of the most used activation functions.
-
span: 0 < y < 1
-
y = 1/(1 + exp(-2sx))
-
d = 2sy*(1 - y)
FANN_SIGMOID_STEPWISE
Stepwise linear approximation to sigmoid.
- Faster than sigmoid but a bit less precise.
FANN_SIGMOID_SYMMETRIC
Symmetric sigmoid activation function, aka. tanh.
-
One of the most used activation functions.
-
span: -1 < y < 1
-
y = tanh(sx) = 2/(1 + exp(-2s*x)) - 1
-
d = s*(1-(y*y))
FANN_SIGMOID_SYMMETRIC_STEPWISE
Stepwise linear approximation to symmetric sigmoid.
- Faster than symmetric sigmoid but a bit less precise.
FANN_GAUSSIAN
Gaussian activation function.
-
0 when x = -inf, 1 when x = 0 and 0 when x = inf
-
span: 0 < y < 1
-
y = exp(-xsx*s)
-
d = -2xsys
FANN_GAUSSIAN_SYMMETRIC
Symmetric gaussian activation function.
-
-1 when x = -inf, 1 when x = 0 and 0 when x = inf
-
span: -1 < y < 1
-
y = exp(-xsx*s)*2-1
-
d = -2xs*(y+1)*s
FANN_GAUSSIAN_STEPWISE
Stepwise linear approximation to gaussian. Faster than gaussian but a bit less precise. NOT implemented yet.
FANN_ELLIOTT
Fast (sigmoid like) activation function defined by David Elliott
-
span: 0 < y < 1
-
y = ((xs) / 2) / (1 + |xs|) + 0.5
-
d = s1/(2(1+|xs|)(1+|x*s|))
FANN_ELLIOTT_SYMMETRIC
Fast (symmetric sigmoid like) activation function defined by David Elliott
-
span: -1 < y < 1
-
y = (xs) / (1 + |xs|)
-
d = s1/((1+|xs|)(1+|xs|))
FANN_LINEAR_PIECE
Bounded linear activation function.
-
span: 0 <= y <= 1
-
y = xs, d = 1s
FANN_LINEAR_PIECE_SYMMETRIC
Bounded linear activation function.
-
span: -1 <= y <= 1
-
y = xs, d = 1s
FANN_SIN_SYMMETRIC
Periodical sine activation function.
-
span: -1 <= y <= 1
-
y = sin(x*s)
-
d = scos(xs)
FANN_COS_SYMMETRIC
Periodical cosine activation function.
-
span: -1 <= y <= 1
-
y = cos(x*s)
-
d = s*-sin(x*s)
FANN_SIN
Periodical sine activation function.
-
span: 0 <= y <= 1
-
y = sin(x*s)/2+0.5
-
d = scos(xs)/2
FANN_COS
Periodical cosine activation function.
-
span: 0 <= y <= 1
-
y = cos(x*s)/2+0.5
-
d = s*-sin(x*s)/2
Trait Implementations
impl Copy for fann_activationfunc_enum
[src]
impl Copy for fann_activationfunc_enum
impl Clone for fann_activationfunc_enum
[src]
impl Clone for fann_activationfunc_enum
fn clone(&self) -> fann_activationfunc_enum
[src]
fn clone(&self) -> fann_activationfunc_enum
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for fann_activationfunc_enum
impl Send for fann_activationfunc_enum
impl Sync for fann_activationfunc_enum
impl Sync for fann_activationfunc_enum