11 #ifndef PHYSICSTOOLS_ONNXRUNTIME_INTERFACE_ONNXRUNTIME_H_ 12 #define PHYSICSTOOLS_ONNXRUNTIME_INTERFACE_ONNXRUNTIME_H_ 19 #include "onnxruntime/core/session/onnxruntime_cxx_api.h" 49 const std::vector<std::vector<int64_t>>& input_shapes = {},
51 int64_t batch_size = 1)
const;
61 static const ::Ort::Env
env_;
std::unique_ptr<::Ort::Session > session_
std::map< std::string, std::vector< int64_t > > input_node_dims_
::Ort::SessionOptions defaultSessionOptions(Backend backend=Backend::cpu)
std::map< std::string, std::vector< int64_t > > output_node_dims_
static const ::Ort::Env env_
std::vector< std::vector< float > > FloatArrays
const std::vector< std::string > & getOutputNames() const
ONNXRuntime(const std::string &model_path, const ::Ort::SessionOptions *session_options=nullptr)
const std::vector< int64_t > & getOutputShape(const std::string &output_name) const
std::vector< const char * > output_node_names_
std::vector< std::string > input_node_strings_
std::vector< const char * > input_node_names_
std::vector< std::string > output_node_strings_
ONNXRuntime & operator=(const ONNXRuntime &)=delete
FloatArrays run(const std::vector< std::string > &input_names, FloatArrays &input_values, const std::vector< std::vector< int64_t >> &input_shapes={}, const std::vector< std::string > &output_names={}, int64_t batch_size=1) const