21 auto allocator = Ort::AllocatorWithDefaultOptions();
24 m_session = Euclid::make_unique<Ort::Session>(
ORT_ENV, model_path.
c_str(), Ort::SessionOptions{nullptr});
27 throw Elements::Exception() <<
"Only ONNX models with a single output tensor are supported";
30 for (
size_t i=0; i<
m_session->GetInputCount(); i++) {
31 auto input_type =
m_session->GetInputTypeInfo(i);
42 auto output_type =
m_session->GetOutputTypeInfo(0);
44 m_output_shape = output_type.GetTensorTypeAndShapeInfo().GetShape();
45 m_output_type = output_type.GetTensorTypeAndShapeInfo().GetElementType();
static Logging getLogger(const std::string &name="")
void info(const std::string &logMessage)
T emplace_back(T... args)