NNFS
Neural network library from scratch
|
Base class for all layers. More...
#include <Layer.hpp>
Public Member Functions | |
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. | |
Public Attributes | |
LayerType | type |
Base class for all layers.
This class is the base class for all layers. It provides the interface for all layers.
|
inline |
Construct a new Layer object.
type | Type of layer |
|
virtualdefault |
Basic destructor.
|
pure virtual |
Backward pass of the layer.
[out] | out | Input gradient |
[in] | dx | Output gradient |
Implemented in NNFS::Dense, NNFS::ReLU, NNFS::Sigmoid, NNFS::Softmax, and NNFS::Tanh.
|
pure virtual |
Forward pass of the layer.
[out] | out | Output data |
[in] | x | Input data |
Implemented in NNFS::Dense, NNFS::ReLU, NNFS::Sigmoid, NNFS::Softmax, and NNFS::Tanh.
LayerType NNFS::Layer::type |