11 #ifndef PHYSICSTOOLS_ONNXRUNTIME_INTERFACE_ONNXRUNTIME_H_ 12 #define PHYSICSTOOLS_ONNXRUNTIME_INTERFACE_ONNXRUNTIME_H_ 19 #include "onnxruntime/core/session/onnxruntime_cxx_api.h" 41 FloatArrays& input_values,
42 const std::vector<std::vector<int64_t>>& input_shapes = {},
43 const std::vector<std::string>& output_names = {},
44 int64_t batch_size = 1)
const;
54 static const ::Ort::Env
env_;
std::unique_ptr<::Ort::Session > session_
std::map< std::string, std::vector< int64_t > > input_node_dims_
std::map< std::string, std::vector< int64_t > > output_node_dims_
static const ::Ort::Env env_
std::vector< std::vector< float > > FloatArrays
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
ONNXRuntime(const std::string &model_path, const ::Ort::SessionOptions *session_options=nullptr)
std::vector< const char * > output_node_names_
const std::vector< std::string > & getOutputNames() const
const std::vector< int64_t > & getOutputShape(const std::string &output_name) const
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