geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | List of all members
geopm::LocalNeuralNet Class Referenceabstract

Class to manage data and operations of feed forward neural nets required for neural net inference. More...

#include <LocalNeuralNet.hpp>

Inheritance diagram for geopm::LocalNeuralNet:
Inheritance graph
[legend]

Public Member Functions

virtual ~LocalNeuralNet ()=default
 
virtual TensorOneD forward (const TensorOneD &inp) const =0
 Perform inference using the instance weights and biases. More...
 
virtual size_t get_input_dim () const =0
 Get the dimension required for the input TensorOneD. More...
 
virtual size_t get_output_dim () const =0
 Get the dimension of the resulting TensorOneD. More...
 
TensorOneD operator() (const TensorOneD &input) const
 

Static Public Member Functions

static std::unique_ptr< LocalNeuralNetmake_unique (std::vector< std::shared_ptr< DenseLayer > > layers)
 Returns a unique_ptr to a concrete object constructed using the underlying implementation from a vector of DenseLayers. More...
 

Detailed Description

Class to manage data and operations of feed forward neural nets required for neural net inference.

Constructor & Destructor Documentation

◆ ~LocalNeuralNet()

virtual geopm::LocalNeuralNet::~LocalNeuralNet ( )
virtualdefault

Member Function Documentation

◆ forward()

virtual TensorOneD geopm::LocalNeuralNet::forward ( const TensorOneD inp) const
pure virtual

Perform inference using the instance weights and biases.

Parameters
[in]TensorOneDvector of input signals.
Exceptions
geopm::Exceptionif input dimension is incompatible with network.
Returns
Returns a TensorOneD vector of output values.

Implemented in geopm::LocalNeuralNetImp.

◆ get_input_dim()

virtual size_t geopm::LocalNeuralNet::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::LocalNeuralNetImp.

◆ get_output_dim()

virtual size_t geopm::LocalNeuralNet::get_output_dim ( ) const
pure virtual

Get the dimension of the resulting TensorOneD.

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

Implemented in geopm::LocalNeuralNetImp.

◆ make_unique()

std::unique_ptr< LocalNeuralNet > geopm::LocalNeuralNet::make_unique ( std::vector< std::shared_ptr< DenseLayer > >  layers)
static

Returns a unique_ptr to a concrete object constructed using the underlying implementation from a vector of DenseLayers.

Parameters
[in]Vectorof DenseLayers

◆ operator()()

TensorOneD geopm::LocalNeuralNet::operator() ( const TensorOneD input) const

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