23 {
24
25 class METNetHandler {
26
27 public:
28
29
30 METNetHandler(const std::string& modelName);
31
32
33 virtual ~METNetHandler() = default;
34
35
37 unsigned int getReqSize() const;
38 void predict(std::vector<float>& outputs, std::vector<float>& inputs) const;
39
40 private:
41
42
43 METNetHandler() = delete;
44
45
46 std::string m_modelName;
47 std::string m_modelPath;
48
49
50 size_t m_numInputs;
51 size_t m_numOutputs;
52 std::vector<int64_t> m_inputDims;
53 std::vector<int64_t> m_outputDims;
54 std::vector<const char *> m_graphInputNames;
55 std::vector<const char *> m_graphOutputNames;
56
57
58 Ort::Env m_onnxEnv;
59 Ort::SessionOptions m_onnxSessionOptions;
60 Ort::AllocatorWithDefaultOptions m_onnxAllocator;
63 };
64
65}
#define ATLAS_THREAD_SAFE