MeLOn
Loading...
Searching...
No Matches
AnnProperties.h
Go to the documentation of this file.
1/**********************************************************************************
2* Copyright (c) 2020 Process Systems Engineering (AVT.SVT), RWTH Aachen University
3*
4* This program and the accompanying materials are made available under the
5* terms of the Eclipse Public License 2.0 which is available at
6* http://www.eclipse.org/legal/epl-2.0.
7*
8* SPDX-License-Identifier: EPL-2.0
9*
10* @file AnnProperties.h
11*
12* @brief File containing declaration of enums and structs for ann properties.
13*
14**********************************************************************************/
15
16#pragma once
17
18#include <vector> // std::vector
19#include <memory> // std::shared_ptr
20
21#include "modelData.h"
22#include "scaler.h"
23
24
25namespace melon {
36
37
42 struct AnnStructure {
45 std::vector<int> layerSize;
46 std::vector<ACTIVATION_FUNCTION> activationFunction;
47 std::vector<int> biasConnect;
48 std::vector<int> inputConnect;
49 std::vector<std::vector<int>> layerConnect;
52 };
53
54
59 struct AnnWeights {
60 std::vector<std::vector<double>> biasWeight;
61 std::vector<std::vector<std::vector<double>>> inputWeight;
62 std::vector<std::vector<std::vector<std::vector<double>>>> layerWeight;
63 };
64
65
71 std::vector<double> inputLowerBound;
72 std::vector<double> inputUpperBound;
73 std::vector<double> outputDenormalizationFactor;
74 std::vector<double> outputDenormalizationOffset;
76 };
77
78
83 struct AnnData : virtual public ModelData {
86 std::shared_ptr<ScalerData> inputScalerData;
87 std::shared_ptr<ScalerData> outputScalerData;
88 };
89}
Definition kernel.h:21
ACTIVATION_FUNCTION
Enum for representing the available types of scaler parameters.
Definition AnnProperties.h:30
@ PURE_LIN
Definition AnnProperties.h:31
@ RELU6
Definition AnnProperties.h:34
@ RELU
Definition AnnProperties.h:33
@ TANH
Definition AnnProperties.h:32
Abstract class from which specific model data object can be derived and enabling polymorphism.
Definition modelData.h:22
struct containing all information regarding the structure of a feedforward neural network
Definition AnnProperties.h:83
AnnStructure structure
Definition AnnProperties.h:84
std::shared_ptr< ScalerData > inputScalerData
Definition AnnProperties.h:86
std::shared_ptr< ScalerData > outputScalerData
Definition AnnProperties.h:87
AnnWeights weights
Definition AnnProperties.h:85
struct containing the parameters required for input normalization and output denormalization of a fee...
Definition AnnProperties.h:70
std::vector< double > outputDenormalizationOffset
Definition AnnProperties.h:74
std::vector< double > outputDenormalizationFactor
Definition AnnProperties.h:73
std::vector< double > inputLowerBound
Definition AnnProperties.h:71
std::vector< double > inputUpperBound
Definition AnnProperties.h:72
struct containing all information regarding the structure of a feedforward neural network
Definition AnnProperties.h:42
std::vector< ACTIVATION_FUNCTION > activationFunction
Definition AnnProperties.h:46
int inputSize
Definition AnnProperties.h:44
std::vector< int > biasConnect
Definition AnnProperties.h:47
int numLayers
Definition AnnProperties.h:43
std::vector< int > layerSize
Definition AnnProperties.h:45
bool normalizedOutput
Definition AnnProperties.h:51
bool scaledInput
Definition AnnProperties.h:50
std::vector< int > inputConnect
Definition AnnProperties.h:48
std::vector< std::vector< int > > layerConnect
Definition AnnProperties.h:49
struct containing the different weights of a feedforward neural network
Definition AnnProperties.h:59
std::vector< std::vector< std::vector< std::vector< double > > > > layerWeight
Definition AnnProperties.h:62
std::vector< std::vector< std::vector< double > > > inputWeight
Definition AnnProperties.h:61
std::vector< std::vector< double > > biasWeight
Definition AnnProperties.h:60