![]() |
ATLAS Offline Software
|
#include <ONNXWrapper.h>
Public Member Functions | |
| ONNXWrapper (const std::string &model_path) | |
| std::map< std::string, std::vector< float > > | Run (std::map< std::string, std::vector< float > > inputs, int n_batches=1) |
| const std::map< std::string, std::vector< int64_t > > | GetModelInputs () |
| const std::map< std::string, std::vector< int64_t > > | GetModelOutputs () |
| const std::map< std::string, std::string > | GetMETAData () |
| std::string | GetMETADataByKey (const char *key) |
| const std::vector< int64_t > & | getInputShape (int input_nr) |
| const std::vector< int64_t > & | getOutputShape (int output_nr) |
| const std::vector< const char * > & | getInputNames () |
| const std::vector< const char * > & | getOutputNames () |
| int | getNumInputs () const |
| int | getNumOutputs () const |
Private Member Functions | |
| const std::vector< int64_t > | getShape (Ort::TypeInfo model_info) |
Private Attributes | |
| std::string | m_modelName |
| std::string | m_modelPath |
| size_t | m_nr_inputs |
| size_t | m_nr_output |
| std::map< std::string, std::vector< int64_t > > | m_input_dims |
| std::map< std::string, std::vector< int64_t > > | m_output_dims |
| std::unique_ptr< Ort::Session > | m_onnxSession |
| std::unique_ptr< Ort::Env > | m_onnxEnv |
| Ort::SessionOptions | m_session_options |
| Ort::AllocatorWithDefaultOptions | m_allocator |
| std::vector< const char * > | m_output_names |
| std::vector< const char * > | m_input_names |
Definition at line 20 of file ONNXWrapper.h.
| ONNXWrapper::ONNXWrapper | ( | const std::string & | model_path | ) |
Definition at line 9 of file ONNXWrapper.cxx.
| const std::vector< const char * > & ONNXWrapper::getInputNames | ( | ) |
Definition at line 156 of file ONNXWrapper.cxx.
| const std::vector< int64_t > & ONNXWrapper::getInputShape | ( | int | input_nr = 0 | ) |
Definition at line 166 of file ONNXWrapper.cxx.
| const std::map< std::string, std::string > ONNXWrapper::GetMETAData | ( | ) |
Definition at line 138 of file ONNXWrapper.cxx.
| std::string ONNXWrapper::GetMETADataByKey | ( | const char * | key | ) |
Definition at line 151 of file ONNXWrapper.cxx.
| const std::map< std::string, std::vector< int64_t > > ONNXWrapper::GetModelInputs | ( | ) |
Definition at line 120 of file ONNXWrapper.cxx.
| const std::map< std::string, std::vector< int64_t > > ONNXWrapper::GetModelOutputs | ( | ) |
Definition at line 129 of file ONNXWrapper.cxx.
| int ONNXWrapper::getNumInputs | ( | ) | const |
Definition at line 178 of file ONNXWrapper.cxx.
| int ONNXWrapper::getNumOutputs | ( | ) | const |
Definition at line 179 of file ONNXWrapper.cxx.
| const std::vector< const char * > & ONNXWrapper::getOutputNames | ( | ) |
Definition at line 161 of file ONNXWrapper.cxx.
| const std::vector< int64_t > & ONNXWrapper::getOutputShape | ( | int | output_nr = 0 | ) |
Definition at line 172 of file ONNXWrapper.cxx.
|
private |
Definition at line 181 of file ONNXWrapper.cxx.
| std::map< std::string, std::vector< float > > ONNXWrapper::Run | ( | std::map< std::string, std::vector< float > > | inputs, |
| int | n_batches = 1 ) |
Definition at line 51 of file ONNXWrapper.cxx.
|
private |
Definition at line 45 of file ONNXWrapper.h.
|
private |
Definition at line 35 of file ONNXWrapper.h.
|
private |
Definition at line 51 of file ONNXWrapper.h.
|
private |
Definition at line 25 of file ONNXWrapper.h.
|
private |
Definition at line 26 of file ONNXWrapper.h.
|
private |
Definition at line 31 of file ONNXWrapper.h.
|
private |
Definition at line 32 of file ONNXWrapper.h.
|
private |
Definition at line 41 of file ONNXWrapper.h.
|
private |
Definition at line 40 of file ONNXWrapper.h.
|
private |
Definition at line 36 of file ONNXWrapper.h.
|
private |
Definition at line 50 of file ONNXWrapper.h.
|
private |
Definition at line 44 of file ONNXWrapper.h.