Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RFunction_MLP.hxx
Go to the documentation of this file.
1#ifndef TMVA_SOFIE_RFUNCTION_MLP
2#define TMVA_SOFIE_RFUNCTION_MLP
3
4#include "TMVA/RFunction.hxx"
5
6#include <vector>
7
8
9namespace TMVA {
10namespace Experimental {
11namespace SOFIE {
12
13enum class Activation {
14 RELU = 0x0,
15 Invalid = 0x1,
16};
17
19private:
20 Int_t fNumLayers; // Number of Layers in MLP
22 bool fActivateFinal; // if True, fActivationFunction is applied as the activation for the last layer
23 std::vector<std::string> fKernelTensors;
24 std::vector<std::string> fBiasTensors;
25
26public:
27 virtual ~RFunction_MLP() {}
28 RFunction_MLP(FunctionTarget target, Int_t numLayers, Activation activation_function=Activation::RELU, bool activate_final=false, GraphType gType=GraphType::GNN);
29
30 void Initialize();
31
32 void AddLayerNormalization(int axis, float epsilon, size_t stashType, const std::string &nameX,
33 const std::string &nameScale, const std::string &nameB, const std::string &nameY);
34
35 void AddInitializedTensors(const std::vector<std::vector<std::string>>& initialized_tensors) {
36 fKernelTensors = initialized_tensors[0];
37 fBiasTensors = initialized_tensors[1];
38 }
39};
40
41} // SOFIE
42} // Experimental
43} // TMVA
44
45#endif //TMVA_SOFIE_RFUNCTION_MLP
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
std::vector< std::string > fKernelTensors
void AddLayerNormalization(int axis, float epsilon, size_t stashType, const std::string &nameX, const std::string &nameScale, const std::string &nameB, const std::string &nameY)
void AddInitializedTensors(const std::vector< std::vector< std::string > > &initialized_tensors)
std::vector< std::string > fBiasTensors
create variable transformations
static int gType