44#ifndef DIWA_ACTIVATIONS_H
45#define DIWA_ACTIVATIONS_H
50#define DIWA_ACTFUNC_LOWER_BOUND -30.0f
51#define DIWA_ACTFUNC_UPPER_BOUND 30.0f
70 static inline double region = 2.0f;
71 static inline double center = 0.0f;
85 DiwaActivationFunc::center = center;
86 DiwaActivationFunc::region = 2 * pow(width, 2);
101 -pow(x - DiwaActivationFunc::center, 2)
102 / DiwaActivationFunc::region
122 return 1.0 / (1.0 + exp(-x));
141 return 1.0 / exp(x * x);
Class containing static methods for common activation functions.
Definition diwa_activations.h:68
static double radialBasis(double x)
Computes the output of the radial basis function.
Definition diwa_activations.h:99
static void initializeRadialBasis(double center, double width)
Initializes the parameters for the radial basis function.
Definition diwa_activations.h:84
static double gaussian(double x)
Gaussian activation function.
Definition diwa_activations.h:135
static double sigmoid(double x)
Sigmoid activation function.
Definition diwa_activations.h:116
#define DIWA_ACTFUNC_UPPER_BOUND
Definition diwa_activations.h:51
double(* diwa_activation)(double)
Typedef for activation function pointer.
Definition diwa_activations.h:59
#define DIWA_ACTFUNC_LOWER_BOUND
Definition diwa_activations.h:50
Utility functions for data conversion in the Diwa neural network library.