|
SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
|
#include <OnnxModel.h>

Public Member Functions | |
| OnnxModel (const std::string &model_path) | |
| template<typename T , typename U > | |
| void | run (std::vector< T > &input_data, std::vector< U > &output_data) const |
| template<typename T , typename U > | |
| void | runMultiInput (std::map< std::string, std::vector< T > > &input_data, std::vector< U > &output_data) const |
| ONNXTensorElementDataType | getInputType () const |
| ONNXTensorElementDataType | getOutputType () const |
| const std::vector< std::int64_t > & | getInputShape () const |
| const std::vector< std::int64_t > & | getOutputShape () const |
| std::string | getDomain () const |
| std::string | getGraphName () const |
| std::string | getInputName () const |
| std::string | getOutputName () const |
| std::string | getModelPath () const |
| size_t | getInputNb () const |
| size_t | getOutputNb () const |
Private Attributes | |
| std::string | m_domain_name |
| domain name | |
| std::string | m_graph_name |
| graph name | |
| std::vector< std::string > | m_input_names |
| Input tensor name. | |
| std::string | m_output_name |
| Output tensor name. | |
| std::vector< ONNXTensorElementDataType > | m_input_types |
| Input type. | |
| ONNXTensorElementDataType | m_output_type |
| Output type. | |
| std::vector< std::vector< std::int64_t > > | m_input_shapes |
| Input tensor shape. | |
| std::vector< std::int64_t > | m_output_shape |
| Output tensor shape. | |
| std::string | m_model_path |
| Path to the ONNX model. | |
| std::unique_ptr< Ort::Session > | m_session |
| Session, one per model. In theory, it is thread-safe. | |
Definition at line 23 of file OnnxModel.h.
|
explicit |
Definition at line 17 of file OnnxModel.cpp.
References std::vector< T >::emplace_back(), std::unique_ptr< T >::get(), Elements::Logging::getLogger(), Elements::Logging::info(), m_domain_name, m_graph_name, m_input_names, m_input_shapes, m_input_types, m_model_path, m_output_name, m_output_shape, m_output_type, m_session, SourceXtractor::onnx_logger, and SourceXtractor::ORT_ENV.

|
inline |
Definition at line 124 of file OnnxModel.h.
References m_domain_name.
Referenced by SourceXtractor::generatePropertyName().
|
inline |
Definition at line 128 of file OnnxModel.h.
References m_graph_name.
Referenced by SourceXtractor::generatePropertyName().
|
inline |
Definition at line 132 of file OnnxModel.h.
References m_input_names.
|
inline |
Definition at line 144 of file OnnxModel.h.
References m_input_names, and std::vector< T >::size().
Referenced by SourceXtractor::MLSegmentation::labelImage().

|
inline |
Definition at line 116 of file OnnxModel.h.
References m_input_shapes.
Referenced by SourceXtractor::computePropertiesSpecialized(), and SourceXtractor::MLSegmentation::labelImage().
|
inline |
Definition at line 108 of file OnnxModel.h.
References m_input_types.
Referenced by SourceXtractor::MLSegmentation::labelImage().
|
inline |
Definition at line 140 of file OnnxModel.h.
References m_model_path.
|
inline |
Definition at line 136 of file OnnxModel.h.
References m_output_name.
Referenced by SourceXtractor::generatePropertyName().
|
inline |
Definition at line 148 of file OnnxModel.h.
|
inline |
Definition at line 120 of file OnnxModel.h.
References m_output_shape.
Referenced by SourceXtractor::computePropertiesSpecialized(), and SourceXtractor::MLSegmentation::labelImage().
|
inline |
Definition at line 112 of file OnnxModel.h.
References m_output_type.
Referenced by SourceXtractor::MLSegmentation::labelImage().
|
inline |
Definition at line 29 of file OnnxModel.h.
References std::accumulate(), std::begin(), std::vector< T >::begin(), std::string::c_str(), std::end(), std::vector< T >::end(), m_input_names, m_input_shapes, m_output_name, m_output_shape, and m_session.
Referenced by SourceXtractor::computePropertiesSpecialized(), and SourceXtractor::MLSegmentation::labelImage().

|
inline |
Definition at line 61 of file OnnxModel.h.
References std::accumulate(), std::begin(), std::vector< T >::begin(), std::string::c_str(), std::end(), std::vector< T >::end(), m_input_names, m_input_shapes, m_output_name, m_output_shape, m_session, and std::vector< T >::size().

|
private |
|
private |
graph name
Definition at line 154 of file OnnxModel.h.
Referenced by getGraphName(), and OnnxModel().
|
private |
Input tensor name.
Definition at line 155 of file OnnxModel.h.
Referenced by getInputName(), getInputNb(), OnnxModel(), run(), and runMultiInput().
|
private |
Input tensor shape.
Definition at line 159 of file OnnxModel.h.
Referenced by getInputShape(), OnnxModel(), run(), and runMultiInput().
|
private |
Input type.
Definition at line 157 of file OnnxModel.h.
Referenced by getInputType(), and OnnxModel().
|
private |
Path to the ONNX model.
Definition at line 161 of file OnnxModel.h.
Referenced by getModelPath(), and OnnxModel().
|
private |
Output tensor name.
Definition at line 156 of file OnnxModel.h.
Referenced by getOutputName(), OnnxModel(), run(), and runMultiInput().
|
private |
Output tensor shape.
Definition at line 160 of file OnnxModel.h.
Referenced by getOutputShape(), OnnxModel(), run(), and runMultiInput().
|
private |
Output type.
Definition at line 158 of file OnnxModel.h.
Referenced by getOutputType(), and OnnxModel().
|
private |
Session, one per model. In theory, it is thread-safe.
Definition at line 162 of file OnnxModel.h.
Referenced by OnnxModel(), run(), and runMultiInput().