Contenido principal

predict

Predict response based on given data using System objects created for QNN backends (HTP, CPU, or LPAI) or eNPU

Since R2025a

Description

response = predict(enpu,InputSignal) predicts response using the hexagon.eNPU object, based on given data.

example

response = predict(qnnbackend,InputSignal) predicts response using the QNN backend object (qnn.HTP, qnn.CPU, or qnn.LPAI) of Qualcomm® AI Direct Engine, based on given data.

Examples

collapse all

Predict response of eAI network by selecting the option to quantize the input and then providing the input data of single data type.

Create hexagon.ENPU System object, by specifying the eAI network file and the input and output quantization range.

enpu = hexagon.ENPU('EAINetworkFile','model_eNPU_on_v3.eai',...
        'InputQuantizationRange',[-6 2.5],...
        'DequantizeOutput',true,...
        'OutputQuantizationRange',[0 1]);

Specify the input signal and call the predict function to obtain the response from the deep learning network .

x = rand(299,299,3,'single');
response = predict(enpu, x)

Predict response using QNN HTP backend object by specifying the host and target QNN models . You can perform similar task for the objects created for CPU and LPAI backends also.

Create qnn.HTP System object, by specifying the QNN host and target file and specifying the need for dequantization of output.

qnnbackend = qnn.HTP("QNN-Model", QNNHostModel=libInception.so, QNNTargetModel=libandroidIncpetion.so, DequantizeOutput=true)

Specify the input signal and call the predict function to obtain the response from the deep learning network for the QNN HTP backend.

x = rand(299,299,3,'single');
response = predict(qnnbackend, x)

Input Arguments

collapse all

hexagon.ENPU System object

System object specific to the QNN backend

The input signal, specified as an N-dimensional array. For more details about the dimension size and data type, see the corresponding System object page.

Data Types: single | half | int8 | int16 | int32 | uint8 | uint16 | uint32

Output Arguments

collapse all

The response after computing predictions using the selected model (eAI or QNN) for eNPU or the QNN backend, represented as an N-dimensional array. For more details about the dimension size and data type, see the corresponding System object page.

Data Types: single | half | int8 | int16 | int32 | uint8 | uint16 | uint32

Version History

Introduced in R2025a