geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
Classes | Public Member Functions | List of all members
geopm::DomainNetMapImp Class Reference

#include <DomainNetMapImp.hpp>

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

Public Member Functions

 DomainNetMapImp (const std::string &nn_path, geopm_domain_e domain_type, int domain_index)
 
 DomainNetMapImp (const std::string &nn_path, geopm_domain_e domain_type, int domain_index, PlatformIO &plat_io, std::shared_ptr< NNFactory > nn_factory)
 
void sample () override
 Samples latest signals for a specific domain and applies the resulting TensorOneD state to the neural net. More...
 
std::vector< std::string > trace_names () const override
 Generates the names for trace columns from the appropriate field in the neural net. More...
 
std::vector< double > trace_values () const override
 Populates trace values from last_output for each index within each domain type. In this case, region classification logits. More...
 
std::map< std::string, double > last_output () const override
 Populates a map of trace names to the latest output from the neural net. In this case, region classification names to their respective logits. More...
 
- Public Member Functions inherited from geopm::DomainNetMap
virtual ~DomainNetMap ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from geopm::DomainNetMap
static std::unique_ptr< DomainNetMapmake_unique (const std::string &nn_path, geopm_domain_e domain_type, int domain_index)
 Returns a unique_ptr to a concrete object constructed using the underlying implementation which loads neural net for a specified domain from a json file. More...
 
static std::shared_ptr< DomainNetMapmake_shared (const std::string &nn_path, geopm_domain_e domain_type, int domain_index)
 Returns a shared_ptr to a concrete object constructed using the underlying implementation which loads neural net for a specified domain from a json file. More...
 

Constructor & Destructor Documentation

◆ DomainNetMapImp() [1/2]

geopm::DomainNetMapImp::DomainNetMapImp ( const std::string &  nn_path,
geopm_domain_e  domain_type,
int  domain_index 
)

◆ DomainNetMapImp() [2/2]

geopm::DomainNetMapImp::DomainNetMapImp ( const std::string &  nn_path,
geopm_domain_e  domain_type,
int  domain_index,
PlatformIO &  plat_io,
std::shared_ptr< NNFactory nn_factory 
)

Member Function Documentation

◆ last_output()

std::map< std::string, double > geopm::DomainNetMapImp::last_output ( ) const
overridevirtual

Populates a map of trace names to the latest output from the neural net. In this case, region classification names to their respective logits.

Returns
A map of string, double containing region class and logits.

Implements geopm::DomainNetMap.

◆ sample()

void geopm::DomainNetMapImp::sample ( )
overridevirtual

Samples latest signals for a specific domain and applies the resulting TensorOneD state to the neural net.

Implements geopm::DomainNetMap.

◆ trace_names()

std::vector< std::string > geopm::DomainNetMapImp::trace_names ( void  ) const
overridevirtual

Generates the names for trace columns from the appropriate field in the neural net.

Implements geopm::DomainNetMap.

◆ trace_values()

std::vector< double > geopm::DomainNetMapImp::trace_values ( ) const
overridevirtual

Populates trace values from last_output for each index within each domain type. In this case, region classification logits.

Returns
Returns a vector of doubles containing trace values

Implements geopm::DomainNetMap.


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