Deep Learning Algorithm Implementations 1.0.0
C++ implementations of fundamental deep learning algorithms
|
Softmax activation function. More...
#include <functions.hpp>
Public Member Functions | |
MatrixD | forward (const MatrixD &x) |
Compute softmax forward pass. | |
MatrixD | backward (const MatrixD &x) |
Compute softmax Jacobian matrix. | |
![]() | |
virtual | ~ActivationFunction ()=default |
Virtual destructor for proper cleanup. | |
Softmax activation function.
Softmax is commonly used in the output layer of multi-class classification networks. It converts a vector of real numbers into a probability distribution.
Mathematical definition:
Definition at line 140 of file functions.hpp.
MatrixD dl::activation::Softmax::backward | ( | const MatrixD & | x | ) |
Compute softmax Jacobian matrix.
x | Input matrix/vector |
Definition at line 55 of file functions.cpp.
MatrixD dl::activation::Softmax::forward | ( | const MatrixD & | x | ) |
Compute softmax forward pass.
x | Input matrix/vector |
Definition at line 48 of file functions.cpp.