ONNX Runtime backed model. More...
#include <ml_onnx_model.h>
Public Member Functions | |
| MlOnnxModel () | |
| ~MlOnnxModel () override | |
| MlTensor | predict (const MlTensor &input) const override |
| bool | save (const QString &path) const override |
| bool | load (const QString &path) override |
| QString | modelType () const override |
| MlTaskType | taskType () const override |
| bool | isLoaded () const |
| Public Member Functions inherited from MLLIB::MlModel | |
| virtual | ~MlModel ()=default |
Additional Inherited Members | |
| Public Types inherited from MLLIB::MlModel | |
| typedef QSharedPointer< MlModel > | SPtr |
ONNX Runtime backed model.
When built without USE_ONNXRUNTIME all methods throw std::runtime_error.
Definition at line 79 of file ml_onnx_model.h.

| MlOnnxModel::MlOnnxModel | ( | ) |
Default constructor.
Definition at line 80 of file ml_onnx_model.cpp.
|
override |
Destructor.
Definition at line 86 of file ml_onnx_model.cpp.
| bool MlOnnxModel::isLoaded | ( | ) | const |
Definition at line 224 of file ml_onnx_model.cpp.
|
overridevirtual |
Load a model from disk.
| [in] | path | File path. |
Implements MLLIB::MlModel.
Definition at line 154 of file ml_onnx_model.cpp.
|
overridevirtual |
Implements MLLIB::MlModel.
Definition at line 235 of file ml_onnx_model.cpp.
Run inference on the given input tensor.
| [in] | input | The input data. |
Implements MLLIB::MlModel.
Definition at line 93 of file ml_onnx_model.cpp.
|
overridevirtual |
Serialise the model to disk.
| [in] | path | File path. |
Implements MLLIB::MlModel.
Definition at line 145 of file ml_onnx_model.cpp.
|
overridevirtual |
Implements MLLIB::MlModel.
Definition at line 242 of file ml_onnx_model.cpp.