geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
Public Member Functions | List of all members
geopm::DenseLayerImp Class Reference

#include <DenseLayerImp.hpp>

Inheritance diagram for geopm::DenseLayerImp:
Inheritance graph
[legend]
Collaboration diagram for geopm::DenseLayerImp:
Collaboration graph
[legend]

Public Member Functions

 DenseLayerImp (const TensorTwoD &weights, const TensorOneD &biases)
 Constructor ingesting a TensoTwoD and TensorOneD object. More...
 
TensorOneD forward (const TensorOneD &input) const override
 Inference step. More...
 
size_t get_input_dim () const override
 Get the dimension required for the input TensorOneD. More...
 
size_t get_output_dim () const override
 Get the dimension of the resulting TensorOneD. More...
 
- Public Member Functions inherited from geopm::DenseLayer
virtual ~DenseLayer ()=default
 
TensorOneD operator() (const TensorOneD &input) const
 

Additional Inherited Members

- Static Public Member Functions inherited from geopm::DenseLayer
static std::unique_ptr< DenseLayermake_unique (const TensorTwoD &weights, const TensorOneD &biases)
 Returns a unique_ptr to a concrete object constructed using the underlying implementation from an pair of weights and biases. More...
 

Constructor & Destructor Documentation

◆ DenseLayerImp()

geopm::DenseLayerImp::DenseLayerImp ( const TensorTwoD weights,
const TensorOneD biases 
)

Constructor ingesting a TensoTwoD and TensorOneD object.

Parameters
[in]weightsThe TensorTwoD object containing weights
[in]biasesThe TensorOneD object containing biases
Exceptions
geopm::Exceptionif the weights is empty
geopm::Exceptionif the dimensions are incompatible, i.e. if weights rows is inequal to bias dimension.

Member Function Documentation

◆ forward()

TensorOneD geopm::DenseLayerImp::forward ( const TensorOneD input) const
overridevirtual

Inference step.

Parameters
[in]inputThe TensorOneD object operating upon the DenseLayer
Exceptions
geopm::Exceptionif input vector is incompatible with the DenseLayer
Returns
Returns a TensorOneD object of output values

Implements geopm::DenseLayer.

◆ get_input_dim()

size_t geopm::DenseLayerImp::get_input_dim ( ) const
overridevirtual

Get the dimension required for the input TensorOneD.

Returns
Returns a size_t equal to the number of columns of weights

Implements geopm::DenseLayer.

◆ get_output_dim()

size_t geopm::DenseLayerImp::get_output_dim ( ) const
overridevirtual

Get the dimension of the resulting TensorOneD.

Returns
Returns a size_t equal to the number of rows of weights

Implements geopm::DenseLayer.


The documentation for this class was generated from the following files: