NNFS
Neural network library from scratch
|
Sigmoid activation function. More...
#include <Sigmoid.hpp>
Public Member Functions | |
Sigmoid () | |
Construct a new Sigmoid object. | |
void | forward (Eigen::MatrixXd &out, const Eigen::MatrixXd &x) override |
Forward pass of the sigmoid activation function. | |
void | backward (Eigen::MatrixXd &out, const Eigen::MatrixXd &dx) override |
Backward pass of the sigmoid activation function. | |
Public Member Functions inherited from NNFS::Activation | |
Activation (ActivationType activation_type) | |
Construct a new Activation object. | |
Public Member Functions inherited from NNFS::Layer | |
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. | |
Additional Inherited Members | |
Public Attributes inherited from NNFS::Activation | |
ActivationType | activation_type |
Public Attributes inherited from NNFS::Layer | |
LayerType | type |
Protected Attributes inherited from NNFS::Activation | |
Eigen::MatrixXd | _forward_input |
Sigmoid activation function.
This class implements the sigmoid activation function.
|
inline |
Construct a new Sigmoid object.
|
inlineoverridevirtual |
Backward pass of the sigmoid activation function.
[out] | out | Input gradient |
[in] | dx | Output gradient |
Implements NNFS::Layer.
|
inlineoverridevirtual |
Forward pass of the sigmoid activation function.
[out] | out | Output of the sigmoid activation function |
[in] | x | Input to the sigmoid activation function |
Implements NNFS::Layer.