Class to store dense layers and perform operations on the layers' 1D and 2D Tensors, aka vectors and matrices, suitable for use in feed-forward neural networks.
More...
#include <DenseLayer.hpp>
Class to store dense layers and perform operations on the layers' 1D and 2D Tensors, aka vectors and matrices, suitable for use in feed-forward neural networks.
◆ ~DenseLayer()
virtual geopm::DenseLayer::~DenseLayer |
( |
| ) |
|
|
virtualdefault |
◆ forward()
Perform inference using the instance weights and biases.
- Parameters
-
- Exceptions
-
geopm::Exception | if input dimension is incompatible with the DenseLayer. |
- Returns
- Returns a TensorOneD vector of output values.
Implemented in geopm::DenseLayerImp.
◆ get_input_dim()
virtual size_t geopm::DenseLayer::get_input_dim |
( |
| ) |
const |
|
pure virtual |
Get the dimension required for the input TensorOneD.
- Returns
- Returns a size_t equal to the number of columns of weights
Implemented in geopm::DenseLayerImp.
◆ get_output_dim()
virtual size_t geopm::DenseLayer::get_output_dim |
( |
| ) |
const |
|
pure virtual |
◆ make_unique()
Returns a unique_ptr to a concrete object constructed using the underlying implementation from an pair of weights and biases.
- Parameters
-
- Exceptions
-
geopm::Exception | if weights is empty |
geopm::Exception | if weights and biases dimensions are incompatible. i.e. if weights rows is inequal to bias dimension. |
◆ operator()()
The documentation for this class was generated from the following files: