Softmax activation function.
More...
#include <Softmax.hpp>
|
| Softmax () |
| Construct a new Softmax object.
|
|
void | forward (Eigen::MatrixXd &out, const Eigen::MatrixXd &x) override |
| Forward pass of the softmax activation function.
|
|
void | backward (Eigen::MatrixXd &out, const Eigen::MatrixXd &dx) override |
| Backward pass of the softmax activation function.
|
|
void | equation (Eigen::MatrixXd &out, const Eigen::MatrixXd &x) |
| Softmax equation.
|
|
| Activation (ActivationType activation_type) |
| Construct a new Activation object.
|
|
| Layer (LayerType type) |
| Construct a new Layer object.
|
|
virtual | ~Layer ()=default |
| Basic destructor.
|
|
virtual void | forward (Eigen::MatrixXd &out, const Eigen::MatrixXd &x)=0 |
| Forward pass of the layer.
|
|
virtual void | backward (Eigen::MatrixXd &out, const Eigen::MatrixXd &dx)=0 |
| Backward pass of the layer.
|
|
Softmax activation function.
This class implements the softmax activation function.
◆ Softmax()
NNFS::Softmax::Softmax |
( |
| ) |
|
|
inline |
◆ backward()
void NNFS::Softmax::backward |
( |
Eigen::MatrixXd & |
out, |
|
|
const Eigen::MatrixXd & |
dx |
|
) |
| |
|
inlineoverridevirtual |
Backward pass of the softmax activation function.
- Parameters
-
[out] | out | Input gradient |
[in] | dx | Output gradient |
Implements NNFS::Layer.
◆ equation()
void NNFS::Softmax::equation |
( |
Eigen::MatrixXd & |
out, |
|
|
const Eigen::MatrixXd & |
x |
|
) |
| |
|
inline |
Softmax equation.
- Parameters
-
[out] | out | Output of the softmax activation function |
[in] | x | Input to the softmax activation function |
◆ forward()
void NNFS::Softmax::forward |
( |
Eigen::MatrixXd & |
out, |
|
|
const Eigen::MatrixXd & |
x |
|
) |
| |
|
inlineoverridevirtual |
Forward pass of the softmax activation function.
- Parameters
-
[out] | out | Output of the softmax activation function |
[in] | x | Input to the softmax activation function |
Implements NNFS::Layer.
◆ _forward_output
Eigen::MatrixXd NNFS::Softmax::_forward_output |
The documentation for this class was generated from the following file: