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

#include <NNFactoryImp.hpp>

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

Public Member Functions

 NNFactoryImp ()=default
 
virtual ~NNFactoryImp ()=default
 
std::shared_ptr< LocalNeuralNetcreateLocalNeuralNet (const std::vector< std::shared_ptr< DenseLayer > > &layers) const override
 Create a LocalNeuralNet. More...
 
std::shared_ptr< DenseLayercreateDenseLayer (const TensorTwoD &weights, const TensorOneD &biases) const override
 Create a Dense Layer. More...
 
TensorTwoD createTensorTwoD (const std::vector< std::vector< double > > &vals) const override
 Create a TensorTwoD object. More...
 
TensorOneD createTensorOneD (const std::vector< double > &vals) const override
 Create a TensorOneD object. More...
 
- Public Member Functions inherited from geopm::NNFactory
virtual ~NNFactory ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from geopm::NNFactory
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...
 

Constructor & Destructor Documentation

◆ NNFactoryImp()

geopm::NNFactoryImp::NNFactoryImp ( )
default

◆ ~NNFactoryImp()

virtual geopm::NNFactoryImp::~NNFactoryImp ( )
virtualdefault

Member Function Documentation

◆ createDenseLayer()

std::shared_ptr< DenseLayer > geopm::NNFactoryImp::createDenseLayer ( const TensorTwoD weights,
const TensorOneD biases 
) const
overridevirtual

Create a Dense Layer.

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

Implements geopm::NNFactory.

◆ createLocalNeuralNet()

std::shared_ptr< LocalNeuralNet > geopm::NNFactoryImp::createLocalNeuralNet ( const std::vector< std::shared_ptr< DenseLayer > > &  layers) const
overridevirtual

Create a LocalNeuralNet.

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

Implements geopm::NNFactory.

◆ createTensorOneD()

TensorOneD geopm::NNFactoryImp::createTensorOneD ( const std::vector< double > &  vals) const
overridevirtual

Create a TensorOneD object.

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

Implements geopm::NNFactory.

◆ createTensorTwoD()

TensorTwoD geopm::NNFactoryImp::createTensorTwoD ( const std::vector< std::vector< double > > &  vals) const
overridevirtual

Create a TensorTwoD object.

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

Implements geopm::NNFactory.


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