geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
NNFactoryImp.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef NNFACTORYIMP_HPP_INCLUDE
7 #define NNFACTORYIMP_HPP_INCLUDE
8 
9 #include "NNFactory.hpp"
10 
11 namespace geopm
12 {
13  class NNFactoryImp : public NNFactory {
14  public:
15  NNFactoryImp() = default;
16  virtual ~NNFactoryImp() = default;
17 
18  std::shared_ptr<LocalNeuralNet> createLocalNeuralNet(
19  const std::vector<std::shared_ptr<DenseLayer> > &layers) const override;
20  std::shared_ptr<DenseLayer> createDenseLayer(const TensorTwoD &weights,
21  const TensorOneD &biases) const override;
22  TensorTwoD createTensorTwoD(const std::vector<std::vector<double> > &vals)
23  const override;
24  TensorOneD createTensorOneD(const std::vector<double> &vals) const override;
25  };
26 }
27 
28 #endif // NNFACTORYIMP_HPP_INCLUDE
Class to generate objects related to feed-forward neural nets, i.e. TensorOneD, TensorTwoD,...
Definition: NNFactory.hpp:21
Definition: NNFactoryImp.hpp:13
TensorOneD createTensorOneD(const std::vector< double > &vals) const override
Create a TensorOneD object.
Definition: NNFactory.cpp:41
std::shared_ptr< DenseLayer > createDenseLayer(const TensorTwoD &weights, const TensorOneD &biases) const override
Create a Dense Layer.
Definition: NNFactory.cpp:30
std::shared_ptr< LocalNeuralNet > createLocalNeuralNet(const std::vector< std::shared_ptr< DenseLayer > > &layers) const override
Create a LocalNeuralNet.
Definition: NNFactory.cpp:24
TensorTwoD createTensorTwoD(const std::vector< std::vector< double > > &vals) const override
Create a TensorTwoD object.
Definition: NNFactory.cpp:36
NNFactoryImp()=default
virtual ~NNFactoryImp()=default
Class to store and perform operations on 1D Tensors, aka vectors, suitable for use in feed-forward ne...
Definition: TensorOneD.hpp:21
Class to manage data and operations related to 2D Tensors required for neural net inference.
Definition: TensorTwoD.hpp:22
Definition: Accumulator.cpp:12