Darwin Neuroevolution Framework
|
Artificial Neural Networks (ANN) building blocks. More...
Classes | |
struct | Config |
The ANN library configuration. More... | |
Enumerations | |
enum | ActivationFunction { ActivationFunction::Identity, ActivationFunction::Logistic, ActivationFunction::Tanh, ActivationFunction::ReLU, ActivationFunction::Neat, ActivationFunction::ReExp, ActivationFunction::LogisticEx } |
The types of supported activation functions. More... | |
Functions | |
void | setActivationFunction (ActivationFunction afn) |
Selects the activation function. | |
void | setGateActivationFunction (ActivationFunction afn) |
Selects the gate activation function (used with ANNs which include gates, for example LSTM) | |
float | activate (float x) |
Applies the selected activation function. More... | |
float | activateGate (float x) |
Applies the selected gate activation function. More... | |
float | afnIdentity (float x) |
Identity function. | |
float | afnLogistic (float x) |
Standard logistic function. | |
float | afnTanh (float x) |
tanh | |
float | afnReLU (float x) |
ReLU. | |
float | afnNeat (float x) |
Classic NEAT activation function. | |
float | afnReExp (float x) |
Experimental: ReExp. More... | |
float | afnLogisticEx (float x) |
Experimental: Yet another sigmoid function. More... | |
template<class T > | |
void | reset (std::vector< T > &v) |
Reset the values in a vector to 0. | |
void | reset (Matrix &matrix) |
Reset the values in a Matrix. | |
void | activateLayer (vector< float > &out) |
Apply the activation function over a set of values. More... | |
void | randomize (Matrix &w) |
Randomize the values in a Matrix. More... | |
float | roundWeight (float w) |
Ajust a value by rounding to Config::connection_resolution. | |
template<class T , class RND > | |
void | mutateValue (T &value, RND &rnd, T std_dev) |
Mutate a value. More... | |
Variables | |
EvaluateLayer | evaluateLayer = nullptr |
Evaluate a fully connected layer. | |
Artificial Neural Networks (ANN) building blocks.
|
strong |
|
inline |
Applies the selected activation function.
|
inline |
Applies the selected gate activation function.
|
inline |
Apply the activation function over a set of values.
|
inline |
Experimental: Yet another sigmoid function.
|
inline |
Experimental: ReExp.
void ann::mutateValue | ( | T & | value, |
RND & | rnd, | ||
T | std_dev | ||
) |
Mutate a value.
|
inline |
Randomize the values in a Matrix.