aclmdlGetDatasetTensorDesc
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
x |
|
|
√ |
|
|
√ |
Description
Obtains the tensor description of the specified input or output from the data of the aclmdlDataset type (used to describe the input and output data during model inference) after the model is executed if the input or output shape of a model is dynamic.
Typical scenario: If the input shape of a model is dynamic, call aclmdlSetDatasetTensorDesc to set the tensor description before the model is executed. After the model is executed, call aclmdlGetDatasetTensorDesc to obtain the tensor description of the dynamic output of the model.
Prototype
aclTensorDesc *aclmdlGetDatasetTensorDesc(const aclmdlDataset *dataset, size_t index)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
dataset |
Input |
Pointer to the input or output data for model execution. |
|
index |
Input |
Input or output index. When a model has multiple inputs and outputs, you can call aclmdlGetInputNameByIndex and aclmdlGetOutputNameByIndex to obtain the input and output names and set the names based on their indexes to avoid index errors. |
Returns
Tensor description of the specified input or output.