Function: get_output_dims
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains tensor dimension information of an output based on the model description.
- Static-shape: This API is used to obtain the shape of the output tensors of a model.
- In the dynamic-shape scenario, this API is used to obtain the shape of the maximum batch/image size profile.
Prototype
- C Prototype
1aclError aclmdlGetOutputDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims)
- Python Function
1dims, ret = acl.mdl.get_output_dims(model_desc, index)
Parameter Description
Parameter |
Description |
|---|---|
model_desc |
Int, pointer address of the data of the aclmdlDesc type. Call acl.mdl.create_desc to create data of the aclmdlDesc type in advance. |
index |
Int, sequence number of the input to obtain, indexed starting at 0 |
Return Value Description
Return Value |
Description |
|---|---|
dims |
Dict, maximum supported combinations for dynamic-batch or dynamic-size scenarios based on the dictionary array. For details, see aclmdlIODims. dims = {
"name": xxx, #tensor name
"dimCount":xxx, # Number of dimensions in the shape
"dims": [xx, xx, xx] # Shape
}
|
ret |
Int, error code.
|