TMVA::RSofieReader class for reading external Machine Learning models in ONNX files and performing the inference using SOFIE.
Definition at line 42 of file RSofieReader.hxx.
|
| | 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.
|
| |
| void | AddCustomOperator (const std::string &opName, const std::string &inputNames, const std::string &outputNames, const std::string &outputShapes, const std::string &fileName) |
| |
| std::vector< float > | Compute (const std::vector< float > &x) |
| |
| RTensor< float > | Compute (RTensor< float > &x) |
| | Compute model prediction on input RTensor The shape of the input tensor should be {nevents, nfeatures} and the return shape will be {nevents, noutputs} support for now only a single input.
|
| |
| 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) |
| |
#include <TMVA/RSofieReader.hxx>
◆ RSofieReader() [1/2]
| TMVA::Experimental::RSofieReader::RSofieReader |
( |
| ) |
|
|
inline |
Dummy constructor which needs model loading afterwards.
Definition at line 47 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 50 of file RSofieReader.hxx.
◆ AddCustomOperator()
| void TMVA::Experimental::RSofieReader::AddCustomOperator |
( |
const std::string & | opName, |
|
|
const std::string & | inputNames, |
|
|
const std::string & | outputNames, |
|
|
const std::string & | outputShapes, |
|
|
const std::string & | fileName ) |
|
inline |
◆ Compute() [1/3]
| std::vector< float > TMVA::Experimental::RSofieReader::Compute |
( |
const std::vector< float > & | x | ) |
|
|
inline |
◆ Compute() [2/3]
| RTensor< float > TMVA::Experimental::RSofieReader::Compute |
( |
RTensor< float > & | x | ) |
|
|
inline |
Compute model prediction on input RTensor The shape of the input tensor should be {nevents, nfeatures} and the return shape will be {nevents, noutputs} support for now only a single input.
Definition at line 270 of file RSofieReader.hxx.
◆ Compute() [3/3]
template<typename... T>
| std::vector< float > TMVA::Experimental::RSofieReader::Compute |
( |
T... | x | ) |
|
|
inline |
◆ DoCompute() [1/3]
| std::vector< float > TMVA::Experimental::RSofieReader::DoCompute |
( |
const std::vector< float > & | x1 | ) |
|
|
inline |
◆ DoCompute() [2/3]
| std::vector< float > TMVA::Experimental::RSofieReader::DoCompute |
( |
const std::vector< float > & | x1, |
|
|
const std::vector< float > & | x2 ) |
|
inline |
◆ 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 |
◆ Load()
| void TMVA::Experimental::RSofieReader::Load |
( |
const std::string & | path, |
|
|
std::vector< std::vector< size_t > > | inputShapes = {}, |
|
|
int | verbose = 0 ) |
|
inline |
◆ fCustomOperators
◆ fFuncPtr
| void* TMVA::Experimental::RSofieReader::fFuncPtr = nullptr |
|
private |
◆ fInitialized
| bool TMVA::Experimental::RSofieReader::fInitialized = false |
|
private |
◆ fNInputs
| int TMVA::Experimental::RSofieReader::fNInputs = 0 |
|
private |
◆ fSessionPtr
| void* TMVA::Experimental::RSofieReader::fSessionPtr = nullptr |
|
private |
The documentation for this class was generated from the following file: