Creating Models
This section describes how to construct a model. HiLens Kit can use the models supported by the Ascend 310 for inference. Use this method to construct a model for subsequent inference. If the model fails to be constructed, the system displays CreateError and an error code is recorded in the log (for example, 0x1013011 indicates that the model path is incorrect). When the returned object is destructed, the corresponding model resource is released.
API Calling
static std::shared_ptr<Model> hilens::Model::Create(const std::string & filename)
Parameter Description
Parameter |
Description |
---|---|
filename |
Path of the model file. If the model is stored in ./mymodels/test.om, the file name is ./mymodels/test.om. |
Return Value
If the operation is successful, the pointer of the model manager instance is returned. If the operation fails, nullptr is returned.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot