Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::RSofieReader Class Reference

TMVA::RSofieReader class for reading external Machine Learning models in ONNX files and performing the inference using SOFIE.

Definition at line 43 of file RSofieReader.hxx.

Public Member Functions

 RSofieReader ()
 Dummy constructor which needs model loading afterwards.
 
 RSofieReader (const std::string &path, std::vector< std::vector< size_t > > inputShapes={}, int verbose=0)
 Create TMVA model from ONNX file print level can be 0 (minimal) 1 with info , 2 with all ONNX parsing info.
 
std::vector< float > Compute (const std::vector< float > &x)
 
template<typename... T>
std::vector< float > Compute (T... x)
 Compute model prediction on vector.
 
std::vector< float > DoCompute (const std::vector< float > &x1)
 
std::vector< float > DoCompute (const std::vector< float > &x1, const std::vector< float > &x2)
 
std::vector< float > DoCompute (const std::vector< float > &x1, const std::vector< float > &x2, const std::vector< float > &x3)
 
void Load (const std::string &path, std::vector< std::vector< size_t > > inputShapes={}, int verbose=0)
 

Private Attributes

void * fFuncPtr = nullptr
 
bool fInitialized = false
 
int fNInputs = 0
 
void * fSessionPtr = nullptr
 

#include <TMVA/RSofieReader.hxx>

Constructor & Destructor Documentation

◆ RSofieReader() [1/2]

TMVA::Experimental::RSofieReader::RSofieReader ( )
inline

Dummy constructor which needs model loading afterwards.

Definition at line 48 of file RSofieReader.hxx.

◆ RSofieReader() [2/2]

TMVA::Experimental::RSofieReader::RSofieReader ( const std::string & path,
std::vector< std::vector< size_t > > inputShapes = {},
int verbose = 0 )
inline

Create TMVA model from ONNX file print level can be 0 (minimal) 1 with info , 2 with all ONNX parsing info.

Definition at line 51 of file RSofieReader.hxx.

Member Function Documentation

◆ Compute() [1/2]

std::vector< float > TMVA::Experimental::RSofieReader::Compute ( const std::vector< float > & x)
inline

Definition at line 239 of file RSofieReader.hxx.

◆ Compute() [2/2]

template<typename... T>
std::vector< float > TMVA::Experimental::RSofieReader::Compute ( T... x)
inline

Compute model prediction on vector.

Definition at line 226 of file RSofieReader.hxx.

◆ DoCompute() [1/3]

std::vector< float > TMVA::Experimental::RSofieReader::DoCompute ( const std::vector< float > & x1)
inline

Definition at line 199 of file RSofieReader.hxx.

◆ DoCompute() [2/3]

std::vector< float > TMVA::Experimental::RSofieReader::DoCompute ( const std::vector< float > & x1,
const std::vector< float > & x2 )
inline

Definition at line 207 of file RSofieReader.hxx.

◆ DoCompute() [3/3]

std::vector< float > TMVA::Experimental::RSofieReader::DoCompute ( const std::vector< float > & x1,
const std::vector< float > & x2,
const std::vector< float > & x3 )
inline

Definition at line 215 of file RSofieReader.hxx.

◆ Load()

void TMVA::Experimental::RSofieReader::Load ( const std::string & path,
std::vector< std::vector< size_t > > inputShapes = {},
int verbose = 0 )
inline

Definition at line 56 of file RSofieReader.hxx.

Member Data Documentation

◆ fFuncPtr

void* TMVA::Experimental::RSofieReader::fFuncPtr = nullptr
private

Definition at line 256 of file RSofieReader.hxx.

◆ fInitialized

bool TMVA::Experimental::RSofieReader::fInitialized = false
private

Definition at line 253 of file RSofieReader.hxx.

◆ fNInputs

int TMVA::Experimental::RSofieReader::fNInputs = 0
private

Definition at line 254 of file RSofieReader.hxx.

◆ fSessionPtr

void* TMVA::Experimental::RSofieReader::fSessionPtr = nullptr
private

Definition at line 255 of file RSofieReader.hxx.

Libraries for TMVA::Experimental::RSofieReader:

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