ModelInference

Function Usage

Performs model inference. You need to call Init to initialize the model first.

Prototype

1
APP_ERROR ModelInferenceProcessor::ModelInference(std::vector<BaseTensor>& inputTensors, std::vector<BaseTensor>& outputTensors, size_t dynamicBatchSize = 0);
1
APP_ERROR ModelInferenceProcessor::ModelInference(std::vector<BaseTensor>& inputTensors, std::vector<BaseTensor>& outputTensors, DynamicInfo dynamicInfo);
1
APP_ERROR ModelInferenceProcessor::ModelInference(const std::vector<TensorBase>& inputTensors, std::vector<TensorBase>& outputTensors, DynamicInfo dynamicInfo);

Parameters

Parameter

Input/Output

Description

inputTensors

Input

Input tensor, which is the input data of model inference

outputTensors

Output

Output tensor, which is the output data of model inference

dynamicBatchSize

Input

Batch size for model inference

dynamicInfo

Input

Dynamic batch information

Response Parameters

Data Structure

Description

APP_ERROR

For details about the returned error codes, see APP_ERROR Description.