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

Class to generate objects related to feed-forward neural nets, i.e. TensorOneD, TensorTwoD, DenseLayer, and LocalNeuralNet objects. More...

#include <NNFactory.hpp>

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

Public Member Functions

virtual ~NNFactory ()=default
 
virtual std::shared_ptr< LocalNeuralNetcreateLocalNeuralNet (const std::vector< std::shared_ptr< DenseLayer > > &layers) const =0
 Create a LocalNeuralNet. More...
 
virtual std::shared_ptr< DenseLayercreateDenseLayer (const TensorTwoD &weights, const TensorOneD &biases) const =0
 Create a Dense Layer. More...
 
virtual TensorTwoD createTensorTwoD (const std::vector< std::vector< double > > &vals) const =0
 Create a TensorTwoD object. More...
 
virtual TensorOneD createTensorOneD (const std::vector< double > &vals) const =0
 Create a TensorOneD object. More...
 

Static Public Member Functions

static std::unique_ptr< NNFactorymake_unique ()
 Returns a unique pointer to a concrete object constructed using the underlying implementation. More...
 
static std::shared_ptr< NNFactorymake_shared ()
 Returns a shared pointer to a concrete object constructed using the underlying implementation. More...
 

Detailed Description

Class to generate objects related to feed-forward neural nets, i.e. TensorOneD, TensorTwoD, DenseLayer, and LocalNeuralNet objects.

Constructor & Destructor Documentation

◆ ~NNFactory()

virtual geopm::NNFactory::~NNFactory ( )
virtualdefault

Member Function Documentation

◆ createDenseLayer()

virtual std::shared_ptr<DenseLayer> geopm::NNFactory::createDenseLayer ( const TensorTwoD weights,
const TensorOneD biases 
) const
pure virtual

Create a Dense Layer.

Parameters
[in]weightsTensorTwoD instance (matrix)
[in]biasesTensorOneD instance (vector)
Returns
Returns a shared pointer to the DenseLayer instance

Implemented in geopm::NNFactoryImp.

◆ createLocalNeuralNet()

virtual std::shared_ptr<LocalNeuralNet> geopm::NNFactory::createLocalNeuralNet ( const std::vector< std::shared_ptr< DenseLayer > > &  layers) const
pure virtual

Create a LocalNeuralNet.

Parameters
[in]layersA shared pointer to a vector of DenseLayers
Returns
Returns a shared pointer to a LocalNeuralNet instance

Implemented in geopm::NNFactoryImp.

◆ createTensorOneD()

virtual TensorOneD geopm::NNFactory::createTensorOneD ( const std::vector< double > &  vals) const
pure virtual

Create a TensorOneD object.

Parameters
[in]valsVector of doubles to fill TensorOneD object
Returns
Returns a TensorOneD instance

Implemented in geopm::NNFactoryImp.

◆ createTensorTwoD()

virtual TensorTwoD geopm::NNFactory::createTensorTwoD ( const std::vector< std::vector< double > > &  vals) const
pure virtual

Create a TensorTwoD object.

Parameters
[in]valsMatrix doubles to fill TensorTwoD object
Returns
Returns a TensorTwoD instance

Implemented in geopm::NNFactoryImp.

◆ make_shared()

std::shared_ptr< NNFactory > geopm::NNFactory::make_shared ( )
static

Returns a shared pointer to a concrete object constructed using the underlying implementation.

◆ make_unique()

std::unique_ptr< NNFactory > geopm::NNFactory::make_unique ( void  )
static

Returns a unique pointer to a concrete object constructed using the underlying implementation.


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