Model Info

hbDNNGetModelNameList

int32_t hbDNNGetModelNameList(char const ***modelNameList, int32_t *modelNameCount, hbDNNPackedHandle_t dnnPackedHandle);

Get the name list and number of the models that dnnPackedHandle points to.

  • Parameter
    • [out] modelNameList List of model names.
    • [out] modelNameCount Number of model names.
    • [in] dnnPackedHandle Horizon DNN handle, pointing to multiple models.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.

hbDNNGetModelHandle

int32_t hbDNNGetModelHandle(hbDNNHandle_t *dnnHandle, hbDNNPackedHandle_t dnnPackedHandle, char const *modelName);

Get the handle of a model from the model list that dnnPackedHandle points to. The caller can use the returned dnnHandle across functions and threads.

  • Parameter
    • [out] dnnHandle DNN handle, pointing to one model.
    • [in] dnnPackedHandle DNN handle, pointing to multiple models.
    • [in] modelName Model name.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.

hbDNNGetInputCount

int32_t hbDNNGetInputCount(int32_t *inputCount, hbDNNHandle_t dnnHandle);

Get the number of the input tensors of the model that dnnHandle points to.

  • Parameter
    • [out] inputCount Number of input tensors of the model.
    • [in] dnnHandle DNN handle, pointing to one model.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.

hbDNNGetInputName

int32_t hbDNNGetInputName(char const **name, hbDNNHandle_t dnnHandle, int32_t inputIndex);

Get the name of the input tensors of the model that dnnHandle points to.

  • Parameter
    • [out] name Name of the input tensor of the model.
    • [in] dnnHandle DNN handle, pointing to one model.
    • [in] inputIndex Index of the input tensor of the model.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.

hbDNNGetInputTensorProperties

int32_t hbDNNGetInputTensorProperties(hbDNNTensorProperties *properties, hbDNNHandle_t dnnHandle, int32_t inputIndex);

Get the property of the specific input tensor of the model that dnnHandle points to.

  • Parameter
    • [out] properties Info of the input tensor.
    • [in] dnnHandle DNN handle, pointing to one model.
    • [in] inputIndex Index of the input tensor of the model.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.

hbDNNGetOutputCount

int32_t hbDNNGetOutputCount(int32_t *outputCount, hbDNNHandle_t dnnHandle);

Get the number of the output tensors of the model that dnnHandle points to.

  • Parameter
    • [out] outputCount Number of the output tensors of the model.
    • [in] dnnHandle DNN handle, pointing to one model.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.

hbDNNGetOutputName

int32_t hbDNNGetOutputName(char const **name, hbDNNHandle_t dnnHandle, int32_t outputIndex);

Get the names of the output tensors of the model that dnnHandle points to.

  • Parameter
    • [out] name Name of the output tensor of the model.
    • [in] dnnHandle DNN handle, pointing to one model.
    • [in] outputIndex Index of the output tensor of the model.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.

hbDNNGetOutputTensorProperties

int32_t hbDNNGetOutputTensorProperties(hbDNNTensorProperties *properties, hbDNNHandle_t dnnHandle, int32_t outputIndex);

Get the property of the specific output tensor of the model that dnnHandle points to.

  • Parameter
    • [out] properties Info of the output tensor.
    • [in] dnnHandle DNN handle, pointing to one model.
    • [in] outputIndex Index of the output tensor of the model.
  • Return Value
    • If the return value is 0, the API is executed successfully, otherwise the execution fails.