147 MatrixD
forward(
const MatrixD &x);
Abstract base class for activation functions.
virtual ~ActivationFunction()=default
Virtual destructor for proper cleanup.
Leaky Rectified Linear Unit (Leaky ReLU) activation function.
double backward(double x)
Compute Leaky ReLU derivative.
double forward(double x)
Compute Leaky ReLU forward pass.
Rectified Linear Unit (ReLU) activation function.
double forward(double x)
Compute ReLU forward pass.
double backward(double x)
Compute ReLU derivative.
Sigmoid activation function.
double forward(double x)
Compute sigmoid forward pass.
double backward(double x)
Compute sigmoid derivative.
Softmax activation function.
MatrixD backward(const MatrixD &x)
Compute softmax Jacobian matrix.
MatrixD forward(const MatrixD &x)
Compute softmax forward pass.
Hyperbolic tangent (Tanh) activation function.
double backward(double x)
Compute tanh derivative.
double forward(double x)
Compute tanh forward pass.
Matrix utility class for deep learning operations.