Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RFunction.hxx
Go to the documentation of this file.
1#ifndef TMVA_SOFIE_RFUNCTION
2#define TMVA_SOFIE_RFUNCTION
3
6
7#include <memory>
8#include <string>
9
10namespace TMVA {
11namespace Experimental {
12namespace SOFIE {
13
14class RModel;
15
16
17class RFunction {
18protected:
19 std::string fFuncName;
21public:
23 virtual ~RFunction() {}
25 return fType;
26 }
27
28 RFunction(std::string funcName, FunctionType type):
29 fFuncName(UTILITY::Clean_name(funcName)),fType(type) {}
30
31};
32
34protected:
35 std::shared_ptr<RModel> function_block;
38 std::vector<std::string> fInputTensors;
39 std::vector<ROperator*> fAddlOp; // temporary vector to store pointer that will be moved in a unique_ptr
40
41public:
42 virtual ~RFunction_Update() {}
45
46 virtual void AddInitializedTensors(const std::vector<std::vector<std::string>>&) {};
47 virtual void Initialize() {};
48 virtual void AddLayerNormalization(int, float, size_t, const std::string&,
49 const std::string&, const std::string&, const std::string&) {};
50 void AddInputTensors(const std::vector<std::vector<std::size_t>>& inputShapes);
51 void AddInputTensors(const std::vector<std::vector<Dim>>& inputShapes);
52 std::shared_ptr<RModel> GetFunctionBlock() {
53 return function_block;
54 }
55 std::string GenerateModel(const std::string& filename, long read_pos = 0, long block_size = -1);
56 std::string Generate(const std::vector<std::string>& inputPtrs);
58 return fTarget;
59 }
60};
61
63protected:
65public:
70 }
71 virtual std::string GenerateModel() = 0;
72 std::string GetFunctionName() {
73 return fFuncName;
74 }
76 return fReducer;
77 }
78 std::string Generate(std::size_t num_features, const std::vector<std::string>& inputTensors);
79 std::string Generate(std::size_t num_features, const std::string & inputTensors);
80
81};
82
83
84}//SOFIE
85}//Experimental
86}//TMVA
87
88
89#endif //TMVA_SOFIE_RFUNCTION
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 filename
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
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 Atom_t Time_t type
std::string Generate(std::size_t num_features, const std::vector< std::string > &inputTensors)
Definition RFunction.cxx:86
virtual void AddLayerNormalization(int, float, size_t, const std::string &, const std::string &, const std::string &, const std::string &)
Definition RFunction.hxx:48
void AddInputTensors(const std::vector< std::vector< std::size_t > > &inputShapes)
Definition RFunction.cxx:50
std::shared_ptr< RModel > function_block
Definition RFunction.hxx:35
std::shared_ptr< RModel > GetFunctionBlock()
Definition RFunction.hxx:52
virtual void AddInitializedTensors(const std::vector< std::vector< std::string > > &)
Definition RFunction.hxx:46
std::string Generate(const std::vector< std::string > &inputPtrs)
Definition RFunction.cxx:74
std::vector< std::string > fInputTensors
Definition RFunction.hxx:38
RFunction(std::string funcName, FunctionType type)
Definition RFunction.hxx:28
create variable transformations