Enum fann::ActivationFunc
[−]
[src]
pub enum ActivationFunc { Linear, Threshold, ThresholdSymmetric, Sigmoid, SigmoidStepwise, SigmoidSymmetric, SigmoidSymmetricStepwise, Gaussian, GaussianSymmetric, GaussianStepwise, Elliott, ElliottSymmetric, LinearPiece, LinearPieceSymmetric, SinSymmetric, CosSymmetric, Sin, Cos, }
The activation functions used for the neurons during training. They can either be set for a
group of neurons using set_activation_func_hidden
and set_activation_func_output
, or for a
single neuron using set_activation_func
.
Similarly, the steepness of an activation function is specified using
set_activation_steepness_hidden
, set_activation_steepness_output
and
set_activation_steepness
.
In the descriptions of the functions:
x is the input to the activation function,
y is the output,
s is the steepness and
d is the derivation.
Variants
Linear | Linear activation function.
|
Threshold | Threshold activation function.
|
ThresholdSymmetric | Threshold activation function.
|
Sigmoid | Sigmoid activation function.
|
SigmoidStepwise | Stepwise linear approximation to sigmoid.
|
SigmoidSymmetric | Symmetric sigmoid activation function, aka. tanh.
|
SigmoidSymmetricStepwise | Stepwise linear approximation to symmetric sigmoid.
|
Gaussian | Gaussian activation function.
|
GaussianSymmetric | Symmetric gaussian activation function.
|
GaussianStepwise | Stepwise linear approximation to gaussian. Faster than gaussian but a bit less precise. NOT implemented yet. |
Elliott | Fast (sigmoid like) activation function defined by David Elliott
|
ElliottSymmetric | Fast (symmetric sigmoid like) activation function defined by David Elliott
|
LinearPiece | Bounded linear activation function.
|
LinearPieceSymmetric | Bounded linear activation function.
|
SinSymmetric | Periodical sine activation function.
|
CosSymmetric | Periodical cosine activation function.
|
Sin | Periodical sine activation function.
|
Cos | Periodical cosine activation function.
|
Methods
impl ActivationFunc
fn from_fann_activationfunc_enum(af_enum: fann_activationfunc_enum) -> FannResult<ActivationFunc>
Create an ActivationFunc
from a fann_sys::fann_activationfunc_enum
.
fn to_fann_activationfunc_enum(&self) -> fann_activationfunc_enum
Return the fann_sys::fann_activationfunc_enum
corresponding to this ActivationFunc
.