FCCAnalyses
Loading...
Searching...
No Matches
ONNXRuntime Class Reference

#include <addons/ONNXRuntime/ONNXRuntime.h>

Collaboration diagram for ONNXRuntime:

Public Types

template<typename T >
using Tensor = std::vector<std::vector<T>>
 

Public Member Functions

 ONNXRuntime (const std::string &="", const std::vector< std::string > &={})
 
virtual ~ONNXRuntime ()
 
 ONNXRuntime (const ONNXRuntime &)=delete
 
ONNXRuntimeoperator= (const ONNXRuntime &)=delete
 
const std::vector< std::string > & inputNames () const
 
template<typename T >
Tensor< T > run (Tensor< T > &, const Tensor< long > &={}, unsigned long long=1ull) const
 

Private Member Functions

size_t variablePos (const std::string &) const
 

Private Attributes

std::unique_ptr< Ort::Env > env_
 
std::unique_ptr< Ort::Session > session_
 
Ort::MemoryInfo memoryInfo_
 
std::vector< const char * > input_node_strings_
 
std::vector< const char * > output_node_strings_
 
std::vector< std::string > input_names_
 
std::map< std::string, std::vector< int64_t > > input_node_dims_
 
std::map< std::string, std::vector< int64_t > > output_node_dims_
 

Member Typedef Documentation

◆ Tensor

template<typename T >
using ONNXRuntime::Tensor = std::vector<std::vector<T>>

Constructor & Destructor Documentation

◆ ONNXRuntime() [1/2]

ONNXRuntime::ONNXRuntime ( const std::string & model_path = "",
const std::vector< std::string > & input_names = {} )
explicit

◆ ~ONNXRuntime()

ONNXRuntime::~ONNXRuntime ( )
virtual

◆ ONNXRuntime() [2/2]

ONNXRuntime::ONNXRuntime ( const ONNXRuntime & )
delete

Member Function Documentation

◆ inputNames()

const std::vector< std::string > & ONNXRuntime::inputNames ( ) const
inline

◆ operator=()

ONNXRuntime & ONNXRuntime::operator= ( const ONNXRuntime & )
delete

◆ run()

template<typename T >
template ONNXRuntime::Tensor< float > ONNXRuntime::run ( Tensor< T > & ,
const Tensor< long > & = {},
unsigned long long = 1ull ) const

◆ variablePos()

size_t ONNXRuntime::variablePos ( const std::string & name) const
private

Member Data Documentation

◆ env_

std::unique_ptr<Ort::Env> ONNXRuntime::env_
private

◆ input_names_

std::vector<std::string> ONNXRuntime::input_names_
private

◆ input_node_dims_

std::map<std::string, std::vector<int64_t> > ONNXRuntime::input_node_dims_
private

◆ input_node_strings_

std::vector<const char*> ONNXRuntime::input_node_strings_
private

◆ memoryInfo_

Ort::MemoryInfo ONNXRuntime::memoryInfo_
private

◆ output_node_dims_

std::map<std::string, std::vector<int64_t> > ONNXRuntime::output_node_dims_
private

◆ output_node_strings_

std::vector<const char*> ONNXRuntime::output_node_strings_
private

◆ session_

std::unique_ptr<Ort::Session> ONNXRuntime::session_
private

The documentation for this class was generated from the following files: