|
ATLAS Offline Software
|
Go to the documentation of this file.
3 #ifndef ATHEXONNXRUNTIME_EVALUATEMODELWithAthInfer_H
4 #define ATHEXONNXRUNTIME_EVALUATEMODELWithAthInfer_H
11 #include "GaudiKernel/ServiceHandle.h"
14 #include <onnxruntime_cxx_api.h>
51 "dev/MLTest/2020-03-31/t10k-images-idx3-ubyte",
52 "Name of the input pixel file to load" };
55 Gaudi::Property<int>
m_batchSize {
this,
"BatchSize", 1,
"No. of elements/example in a batch"};
59 this,
"ORTInferenceTool",
"AthOnnx::OnnxRuntimeInferenceTool"
68 #endif // ATHEXONNXRUNTIME_EVALUATEMODEL_H
ToolHandle< AthInfer::IAthInferenceTool > m_onnxTool
Tool handler for onnx inference session.
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm for a single event.
Gaudi::Property< int > m_batchSize
Following properties needed to be consdered if the .onnx model is evaluated in batch mode.
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode initialize() override
Function initialising the algorithm.
AthReentrantAlgorithm()
Default constructor:
std::vector< std::vector< std::vector< float > > > m_input_tensor_values_notFlat
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::string > m_pixelFileName
Name of the model file to load.
Algorithm demonstrating the usage of the ONNX Runtime C++ API.
Namespace holding all of the Onnx Runtime example code.