AscendNNInference
API定义 |
AscendNNInference(std::vector<int> deviceList, const char* model, uint64_t modelSize) |
---|---|
功能描述 |
AscendNNInference的构造函数,生成AscendNNInference,此时根据“deviceList”中配置的值设置NPU侧芯片资源以及模型路径等。 |
输入 |
std::vector<int> deviceList:NPU侧芯片资源。 const char* model:深度神经网络降维模型。 uint64_t modelSize:深度神经网络降维模型的大小。 |
输出 |
无 |
返回值 |
无 |
约束说明 |
“model”需要为合法有效的深度网络降维模型的内存指针,大小为“modelSize”,modelSize取值范围(0, 128MB],参数不匹配可能造成模型实例化或推理失败。非法的模型可能会对系统造成危害,请确保模型的来源合法有效。 |
父主题: AscendNNInference