![]() |
Project
|
Derived class implementing interface for specific types of models. More...
#include <FastSimulations.h>
Inherits o2::zdc::fastsim::NeuralFastSimulation.
Public Member Functions | |
ConditionalModelSimulation (const std::string &modelPath, int64_t batchSize) | |
~ConditionalModelSimulation () override=default | |
bool | setInput (std::vector< std::vector< float > > &input) override |
Implements setInput. | |
void | run () override |
Implements run(). | |
const std::vector< Ort::Value > & | getResult () override |
Returns single model output as const&. Returned vector is of size 1. | |
![]() | |
NeuralFastSimulation (const std::string &modelPath, OrtAllocatorType allocatorType, OrtMemType memoryType, int64_t batchSize) | |
virtual | ~NeuralFastSimulation ()=default |
void | initRunSession () |
(late) init session and provide mechanism to customize ONNX session with external options | |
size_t | getBatchSize () const |
Additional Inherited Members | |
![]() | |
void | setInputOutputData () |
Sets models metadata (input/output layers names, inputs shape) in onnx session. | |
void | setTensors (std::vector< std::vector< float > > &input) |
Converts flattend input data to Ort::Value. Tensor shapes are taken from loaded model metadata. | |
![]() | |
std::string | mModelPath |
model path (where to find the ONNX model) | |
Ort::Env | mEnv |
Ort::Session * | mSession = nullptr |
Ort::AllocatorWithDefaultOptions | mAllocator |
Ort::MemoryInfo | mMemoryInfo |
std::vector< std::string > | mInputNames |
Input/Output names and input shape. | |
std::vector< std::string > | mOutputNames |
std::vector< std::vector< int64_t > > | mInputShapes |
int64_t | mBatchSize |
std::vector< Ort::Value > | mInputTensors |
Container for input tensors. | |
Derived class implementing interface for specific types of models.
Definition at line 100 of file FastSimulations.h.
ConditionalModelSimulation::ConditionalModelSimulation | ( | const std::string & | modelPath, |
int64_t | batchSize | ||
) |
Definition at line 81 of file FastSimulations.cxx.
|
overridedefault |
|
overridevirtual |
Returns single model output as const&. Returned vector is of size 1.
Implements o2::zdc::fastsim::NeuralFastSimulation.
Definition at line 116 of file FastSimulations.cxx.
|
overridevirtual |
Implements run().
Implements o2::zdc::fastsim::NeuralFastSimulation.
Definition at line 96 of file FastSimulations.cxx.
|
overridevirtual |
Implements setInput.
input | flattend input |
Implements o2::zdc::fastsim::NeuralFastSimulation.
Definition at line 86 of file FastSimulations.cxx.