Function: get_dataset_tensor_desc
C Prototype |
aclTensorDesc *aclmdlGetDatasetTensorDesc(const aclmdlDataset *dataset, size_t index) |
|---|---|
Python Function |
tensorDesc =acl.mdl.get_dataset_tensor_desc(dataset, index) |
Function Usage |
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 acl.mdl.set_dataset_tensor_desc to set the tensor description before the model is executed. After the model is executed, call acl.mdl.get_dataset_tensor_desc to obtain the tensor description of the dynamic output of the model. The Atlas 200/300/500 Inference Product does not support this API. |
Input Description |
dataset: int, pointer address of the input or output data structure for model execution. index: int, input or output index. When a model has multiple inputs and outputs, call acl.mdl.get_input_name_by_index or acl.mdl.get_output_name_by_index to obtain the input or output names and set the index accordingly. |
Return Value |
tensorDesc: int, pointer address of the tensor description of the specified input or output. |