Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::SOFIE::RModel Class Referencefinal

Definition at line 12 of file RModel.hxx.

Public Member Functions

 RModel ()=default
 Default constructor.
 
 RModel (const RModel &other)=delete
 
 RModel (RModel &&other)
 
 RModel (std::string function_name)
 
 RModel (std::string name, std::string parsedtime)
 
 ~RModel ()=default
 
void AddDynamicTensor (std::string tensor_name, ETensorType type, std::vector< Dim > shape)
 
void AddInitializedTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape, std::shared_ptr< void > data)
 
template<typename T >
void AddInitializedTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape, T *raw_data)
 
void AddInputTensorInfo (std::string input_name, ETensorType type, std::vector< Dim > shape)
 
void AddInputTensorInfo (std::string input_name, ETensorType type, std::vector< size_t > shape)
 
void AddInputTensorName (std::string name)
 
void AddIntermediateTensor (std::string tensor_name, ETensorType type, std::vector< Dim > dim_shape)
 
void AddIntermediateTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape)
 
void AddOperator (std::unique_ptr< ROperator > op, int order_execution=-1)
 
void AddOperatorReference (ROperator *op, int order_execution=-1)
 
void AddOutputTensorNameList (std::vector< std::string > output_tensor_names)
 
bool CheckIfTensorAlreadyExist (std::string tensor_name)
 
 ClassDefNV (RModel, 2)
 
void Generate (Options options=Options::kDefault, int batchSize=-1, int pos=0)
 
void Generate (std::underlying_type_t< Options > options, int batchSize=-1, long pos=0)
 
void GenerateDynamicTensorInfo ()
 
void GenerateInitializedTensorInfo ()
 
void GenerateIntermediateTensorInfo ()
 
void GenerateOutput ()
 
std::vector< DimGetDynamicTensorShape (std::string name)
 
std::shared_ptr< void > GetInitializedTensorData (std::string tensor_name)
 
const std::vector< std::string > & GetInputTensorNames () const
 
std::vector< std::string > GetOutputTensorNames ()
 
const std::vector< std::string > & GetOutputTensorNames () const
 
const std::vector< size_t > & GetTensorShape (std::string name)
 
const ETensorTypeGetTensorType (std::string name)
 
void HeadInitializedTensors (std::string name, int n_print=50)
 
void Initialize (int batchSize=-1, bool verbose=false)
 
bool IsDynamicTensor (const std::string &name) const
 
bool IsInitializedTensor (const std::string &name) const
 
bool IsInputTensor (const std::string &name) const
 
RModeloperator= (const RModel &other)=delete
 
RModeloperator= (RModel &&other)
 
void OutputGenerated (std::string filename="", bool append=false)
 
void PrintDynamicTensors ()
 
void PrintInitializedTensors ()
 
void PrintIntermediateTensors ()
 
void PrintOutputTensors ()
 
void PrintRequiredInputTensors ()
 
void ReadInitializedTensorsFromFile (long)
 
void SetFilename (std::string filename)
 
void UpdateInitializedTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape, std::shared_ptr< void > data)
 
void UpdateOutputTensorList (std::vector< std::string > curr_output_tensor, std::vector< std::string > modify_output_tensor)
 
bool UseSession () const
 
long WriteInitializedTensorsToFile (std::string filename="")
 
- Public Member Functions inherited from TMVA::Experimental::SOFIE::RModel_Base
 RModel_Base ()=default
 Default constructor.
 
 RModel_Base (std::string function_name)
 
 RModel_Base (std::string name, std::string parsedtime)
 
void AddBlasRoutines (std::vector< std::string > routines)
 
void AddNeededCustomHeader (std::string filename)
 
void AddNeededStdLib (std::string libname)
 
void GenerateHeaderInfo (std::string &hgname)
 
std::string GetFilename ()
 
void OutputGenerated (std::string filename="", bool append=false)
 
void PrintGenerated ()
 
std::string ReturnGenerated ()
 
void SetFilename (std::string filename)
 

Private Attributes

std::unordered_map< std::string, DynamicTensorInfofDynamicTensorInfos
 
std::unordered_map< std::string, InitializedTensorfInitializedTensors
 
std::unordered_map< std::string, InputTensorInfofInputTensorInfos
 
std::vector< std::string > fInputTensorNames
 
std::unordered_map< std::string, TensorInfofIntermediateTensorInfos
 
std::vector< std::unique_ptr< ROperator > > fOperators
 
std::vector< std::string > fOutputTensorNames
 
std::unordered_map< std::string, TensorInfofReadyInputTensorInfos
 
std::unordered_map< std::string, std::string > fShapeParams
 
const std::string SP = " "
 

Additional Inherited Members

- Protected Attributes inherited from TMVA::Experimental::SOFIE::RModel_Base
const std::unordered_set< std::string > fAllowedStdLib = {"vector", "algorithm", "cmath"}
 
std::unordered_set< std::string > fCustomOpHeaders
 
std::string fFileName
 
std::string fGC
 
bool fIsGNN = false
 
bool fIsGNNComponent = false
 
std::string fName = "UnnamedModel"
 
std::unordered_set< std::string > fNeededBlasRoutines
 
std::unordered_set< std::string > fNeededStdLib = {"vector"}
 
std::string fParseTime
 
bool fUseSession = true
 
bool fUseWeightFile = true
 
WeightFileType fWeightFile = WeightFileType::Text
 

#include <TMVA/RModel.hxx>

Inheritance diagram for TMVA::Experimental::SOFIE::RModel:
[legend]

Constructor & Destructor Documentation

◆ RModel() [1/5]

TMVA::Experimental::SOFIE::RModel::RModel ( RModel &&  other)

Definition at line 23 of file RModel.cxx.

◆ RModel() [2/5]

TMVA::Experimental::SOFIE::RModel::RModel ( const RModel other)
delete

◆ ~RModel()

TMVA::Experimental::SOFIE::RModel::~RModel ( )
default

◆ RModel() [3/5]

TMVA::Experimental::SOFIE::RModel::RModel ( )
default

Default constructor.

Needed to allow serialization of ROOT objects. See https://root.cern/manual/io_custom_classes/#restrictions-on-types-root-io-can-handle

◆ RModel() [4/5]

TMVA::Experimental::SOFIE::RModel::RModel ( std::string  name,
std::string  parsedtime 
)
inline

Definition at line 43 of file RModel.hxx.

◆ RModel() [5/5]

TMVA::Experimental::SOFIE::RModel::RModel ( std::string  function_name)
inline

Definition at line 46 of file RModel.hxx.

Member Function Documentation

◆ AddDynamicTensor()

void TMVA::Experimental::SOFIE::RModel::AddDynamicTensor ( std::string  tensor_name,
ETensorType  type,
std::vector< Dim shape 
)

Definition at line 204 of file RModel.cxx.

◆ AddInitializedTensor() [1/2]

void TMVA::Experimental::SOFIE::RModel::AddInitializedTensor ( std::string  tensor_name,
ETensorType  type,
std::vector< std::size_t >  shape,
std::shared_ptr< void >  data 
)

Definition at line 161 of file RModel.cxx.

◆ AddInitializedTensor() [2/2]

template<typename T >
void TMVA::Experimental::SOFIE::RModel::AddInitializedTensor ( std::string  tensor_name,
ETensorType  type,
std::vector< std::size_t >  shape,
T *  raw_data 
)
inline

Definition at line 65 of file RModel.hxx.

◆ AddInputTensorInfo() [1/2]

void TMVA::Experimental::SOFIE::RModel::AddInputTensorInfo ( std::string  input_name,
ETensorType  type,
std::vector< Dim shape 
)

Definition at line 125 of file RModel.cxx.

◆ AddInputTensorInfo() [2/2]

void TMVA::Experimental::SOFIE::RModel::AddInputTensorInfo ( std::string  input_name,
ETensorType  type,
std::vector< size_t >  shape 
)

Definition at line 135 of file RModel.cxx.

◆ AddInputTensorName()

void TMVA::Experimental::SOFIE::RModel::AddInputTensorName ( std::string  name)

Definition at line 144 of file RModel.cxx.

◆ AddIntermediateTensor() [1/2]

void TMVA::Experimental::SOFIE::RModel::AddIntermediateTensor ( std::string  tensor_name,
ETensorType  type,
std::vector< Dim dim_shape 
)

Definition at line 187 of file RModel.cxx.

◆ AddIntermediateTensor() [2/2]

void TMVA::Experimental::SOFIE::RModel::AddIntermediateTensor ( std::string  tensor_name,
ETensorType  type,
std::vector< std::size_t >  shape 
)

Definition at line 195 of file RModel.cxx.

◆ AddOperator()

void TMVA::Experimental::SOFIE::RModel::AddOperator ( std::unique_ptr< ROperator op,
int  order_execution = -1 
)

Definition at line 148 of file RModel.cxx.

◆ AddOperatorReference()

void TMVA::Experimental::SOFIE::RModel::AddOperatorReference ( ROperator op,
int  order_execution = -1 
)
inline

Definition at line 56 of file RModel.hxx.

◆ AddOutputTensorNameList()

void TMVA::Experimental::SOFIE::RModel::AddOutputTensorNameList ( std::vector< std::string >  output_tensor_names)

Definition at line 225 of file RModel.cxx.

◆ CheckIfTensorAlreadyExist()

bool TMVA::Experimental::SOFIE::RModel::CheckIfTensorAlreadyExist ( std::string  tensor_name)

Definition at line 116 of file RModel.cxx.

◆ ClassDefNV()

TMVA::Experimental::SOFIE::RModel::ClassDefNV ( RModel  ,
 
)

◆ Generate() [1/2]

void TMVA::Experimental::SOFIE::RModel::Generate ( Options  options = Options::kDefault,
int  batchSize = -1,
int  pos = 0 
)
inline

Definition at line 101 of file RModel.hxx.

◆ Generate() [2/2]

void TMVA::Experimental::SOFIE::RModel::Generate ( std::underlying_type_t< Options options,
int  batchSize = -1,
long  pos = 0 
)

Definition at line 529 of file RModel.cxx.

◆ GenerateDynamicTensorInfo()

void TMVA::Experimental::SOFIE::RModel::GenerateDynamicTensorInfo ( )

Definition at line 392 of file RModel.cxx.

◆ GenerateInitializedTensorInfo()

void TMVA::Experimental::SOFIE::RModel::GenerateInitializedTensorInfo ( )

Definition at line 324 of file RModel.cxx.

◆ GenerateIntermediateTensorInfo()

void TMVA::Experimental::SOFIE::RModel::GenerateIntermediateTensorInfo ( )

Definition at line 351 of file RModel.cxx.

◆ GenerateOutput()

void TMVA::Experimental::SOFIE::RModel::GenerateOutput ( )

Definition at line 405 of file RModel.cxx.

◆ GetDynamicTensorShape()

std::vector< Dim > TMVA::Experimental::SOFIE::RModel::GetDynamicTensorShape ( std::string  name)

Definition at line 79 of file RModel.cxx.

◆ GetInitializedTensorData()

std::shared_ptr< void > TMVA::Experimental::SOFIE::RModel::GetInitializedTensorData ( std::string  tensor_name)

Definition at line 248 of file RModel.cxx.

◆ GetInputTensorNames()

const std::vector< std::string > & TMVA::Experimental::SOFIE::RModel::GetInputTensorNames ( ) const
inline

Definition at line 106 of file RModel.hxx.

◆ GetOutputTensorNames() [1/2]

std::vector< std::string > TMVA::Experimental::SOFIE::RModel::GetOutputTensorNames ( )
inline

Definition at line 115 of file RModel.hxx.

◆ GetOutputTensorNames() [2/2]

const std::vector< std::string > & TMVA::Experimental::SOFIE::RModel::GetOutputTensorNames ( ) const
inline

Definition at line 107 of file RModel.hxx.

◆ GetTensorShape()

const std::vector< size_t > & TMVA::Experimental::SOFIE::RModel::GetTensorShape ( std::string  name)

Definition at line 56 of file RModel.cxx.

◆ GetTensorType()

const ETensorType & TMVA::Experimental::SOFIE::RModel::GetTensorType ( std::string  name)

Definition at line 91 of file RModel.cxx.

◆ HeadInitializedTensors()

void TMVA::Experimental::SOFIE::RModel::HeadInitializedTensors ( std::string  name,
int  n_print = 50 
)

Definition at line 884 of file RModel.cxx.

◆ Initialize()

void TMVA::Experimental::SOFIE::RModel::Initialize ( int  batchSize = -1,
bool  verbose = false 
)

Definition at line 257 of file RModel.cxx.

◆ IsDynamicTensor()

bool TMVA::Experimental::SOFIE::RModel::IsDynamicTensor ( const std::string &  name) const

Definition at line 177 of file RModel.cxx.

◆ IsInitializedTensor()

bool TMVA::Experimental::SOFIE::RModel::IsInitializedTensor ( const std::string &  name) const

Definition at line 172 of file RModel.cxx.

◆ IsInputTensor()

bool TMVA::Experimental::SOFIE::RModel::IsInputTensor ( const std::string &  name) const

Definition at line 181 of file RModel.cxx.

◆ operator=() [1/2]

RModel & TMVA::Experimental::SOFIE::RModel::operator= ( const RModel other)
delete

◆ operator=() [2/2]

RModel & TMVA::Experimental::SOFIE::RModel::operator= ( RModel &&  other)

Definition at line 39 of file RModel.cxx.

◆ OutputGenerated()

void TMVA::Experimental::SOFIE::RModel::OutputGenerated ( std::string  filename = "",
bool  append = false 
)

Definition at line 920 of file RModel.cxx.

◆ PrintDynamicTensors()

void TMVA::Experimental::SOFIE::RModel::PrintDynamicTensors ( )

Definition at line 857 of file RModel.cxx.

◆ PrintInitializedTensors()

void TMVA::Experimental::SOFIE::RModel::PrintInitializedTensors ( )

Definition at line 827 of file RModel.cxx.

◆ PrintIntermediateTensors()

void TMVA::Experimental::SOFIE::RModel::PrintIntermediateTensors ( )

Definition at line 842 of file RModel.cxx.

◆ PrintOutputTensors()

void TMVA::Experimental::SOFIE::RModel::PrintOutputTensors ( )

Definition at line 872 of file RModel.cxx.

◆ PrintRequiredInputTensors()

void TMVA::Experimental::SOFIE::RModel::PrintRequiredInputTensors ( )

Definition at line 797 of file RModel.cxx.

◆ ReadInitializedTensorsFromFile()

void TMVA::Experimental::SOFIE::RModel::ReadInitializedTensorsFromFile ( long  pos)

Definition at line 628 of file RModel.cxx.

◆ SetFilename()

void TMVA::Experimental::SOFIE::RModel::SetFilename ( std::string  filename)
inline

Definition at line 116 of file RModel.hxx.

◆ UpdateInitializedTensor()

void TMVA::Experimental::SOFIE::RModel::UpdateInitializedTensor ( std::string  tensor_name,
ETensorType  type,
std::vector< std::size_t >  shape,
std::shared_ptr< void >  data 
)

Definition at line 239 of file RModel.cxx.

◆ UpdateOutputTensorList()

void TMVA::Experimental::SOFIE::RModel::UpdateOutputTensorList ( std::vector< std::string >  curr_output_tensor,
std::vector< std::string >  modify_output_tensor 
)

Definition at line 232 of file RModel.cxx.

◆ UseSession()

bool TMVA::Experimental::SOFIE::RModel::UseSession ( ) const
inline

Definition at line 136 of file RModel.hxx.

◆ WriteInitializedTensorsToFile()

long TMVA::Experimental::SOFIE::RModel::WriteInitializedTensorsToFile ( std::string  filename = "")

Definition at line 703 of file RModel.cxx.

Member Data Documentation

◆ fDynamicTensorInfos

std::unordered_map<std::string, DynamicTensorInfo> TMVA::Experimental::SOFIE::RModel::fDynamicTensorInfos
private

Definition at line 20 of file RModel.hxx.

◆ fInitializedTensors

std::unordered_map<std::string, InitializedTensor> TMVA::Experimental::SOFIE::RModel::fInitializedTensors
private

Definition at line 18 of file RModel.hxx.

◆ fInputTensorInfos

std::unordered_map<std::string, InputTensorInfo> TMVA::Experimental::SOFIE::RModel::fInputTensorInfos
private

Definition at line 16 of file RModel.hxx.

◆ fInputTensorNames

std::vector<std::string> TMVA::Experimental::SOFIE::RModel::fInputTensorNames
private

Definition at line 24 of file RModel.hxx.

◆ fIntermediateTensorInfos

std::unordered_map<std::string, TensorInfo> TMVA::Experimental::SOFIE::RModel::fIntermediateTensorInfos
private

Definition at line 19 of file RModel.hxx.

◆ fOperators

std::vector<std::unique_ptr<ROperator> > TMVA::Experimental::SOFIE::RModel::fOperators
private

Definition at line 26 of file RModel.hxx.

◆ fOutputTensorNames

std::vector<std::string> TMVA::Experimental::SOFIE::RModel::fOutputTensorNames
private

Definition at line 23 of file RModel.hxx.

◆ fReadyInputTensorInfos

std::unordered_map<std::string, TensorInfo> TMVA::Experimental::SOFIE::RModel::fReadyInputTensorInfos
private

Definition at line 17 of file RModel.hxx.

◆ fShapeParams

std::unordered_map<std::string, std::string> TMVA::Experimental::SOFIE::RModel::fShapeParams
private

Definition at line 22 of file RModel.hxx.

◆ SP

const std::string TMVA::Experimental::SOFIE::RModel::SP = " "
private

Definition at line 28 of file RModel.hxx.

Libraries for TMVA::Experimental::SOFIE::RModel:

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