メインコンテンツ

qnn.getNetworkProperties

Read values for properties defined in QNN model or QNN context binary file

Since R2025b

Description

qnn.getNetworkProperties(DLNetworkFormat="QNN-Model", QNNHostModel) reads values of input layer and output layer properties defined in the specified QNN host model file (which is used while creating qnn.HTP or qnn.CPU System object) and returns a structure of values. This syntax is valid for Windows and Linux host.

qnn.getNetworkProperties(DLNetworkFormat="BINARY", QNNContextBinary,"HTP") reads values of input layer and output layer properties defined in QNN context binary file (which is used while creating qnn.HTP System object) and returns a structure of values. This syntax is valid for Linux host only.

qnn.getNetworkProperties(DLNetworkFormat="BINARY", QNNContextBinary,"LPAI") reads values of input layer and output layer properties defined in QNN context binary file (which is used while creating qnn.LPAI System object) and returns a structure of values. This syntax is valid for Linux host only.

Examples

collapse all

Copy the QNN model (for example, LibInspection.dll) to Current Folder in MATLAB.

Use qnn.getNetworkProperties function to read the properties from that file.

qnnNet = qnn.getNetworkProperties("QNN-Model" , "LibInspection.dll")
qnnNet =

  struct with fields:

     InputLayer: [1×1 struct]    
     OutputLayer: [1×1 struct]

Read the input layer properties.

qnnNet.InputLayer
ans =

  struct with fields:

           TensorCount: 1
           TensorDimensions: {[1 299 299 3]}
           TensorDataType: {'single'}
           QuantizationScale: {[0]}
           QuantizationOffset: {[0]}

Read the output layer properties.

qnnNet.OutputLayer
ans =

  struct with fields:

           TensorCount: 1
           TensorDimensions: {[1 1001]}
           TensorDataType: {'single'}
           QuantizationScale: {[0]}
           QuantizationOffset: {[0]}

Input Arguments

collapse all

The format of deep learning network optimized to run on the specified backend on the target, specified as a string.

Data Types: string

Specify the QNN model, either compiled shared object (.so) for Linux or .dll for Windows, used for creating qnn.HTP or qnn.CPU System Objects. For details on creating an QNN model to run on device processors, refer to Qualcomm AI Engine Direct SDK documentation.

If the QNN model is not present in the Current Folder in MATLAB, specify the absolute path along with <filename>.so or <filename>.dll.

Data Types: string

Specify the QNN context binary file (.bin) on the target used for creating qnn.HTP or qnn.LPAI System Objects. For details on creating an binary file to run on device processors, refer to Qualcomm AI Engine Direct SDK documentation.

If the QNN context binary file is not present in the Current Folder in MATLAB, specify the absolute path along with <filename>.bin

Data Types: string

Version History

Introduced in R2025b