|
API Reference Manual 1.51.0
|
Model input / output data shape information. More...
#include <ml_types.h>
Data Fields | |
| odp_ml_shape_type_t | type |
| Shape type. | |
| uint32_t | num_dim |
| Number of dimensions. | |
| uint32_t | dim [ODP_ML_MAX_DIMS] |
| Dimension sizes. | |
| uint32_t | dim_min [ODP_ML_MAX_DIMS] |
| Minimum dimension sizes. | |
| uint32_t | dim_max [ODP_ML_MAX_DIMS] |
| Maximum dimension sizes. | |
| char | dim_name [ODP_ML_MAX_DIMS][ODP_ML_SHAPE_NAME_LEN] |
| Dimension name. | |
Model input / output data shape information.
Definition at line 465 of file api/spec/ml_types.h.
| odp_ml_shape_type_t odp_ml_shape_info_t::type |
Shape type.
Definition at line 467 of file api/spec/ml_types.h.
| uint32_t odp_ml_shape_info_t::num_dim |
Number of dimensions.
Number of input / output data dimensions. When zero, the model does not have dimension information available. ODP API supports in maximum ODP_ML_MAX_DIMS dimensions.
Definition at line 475 of file api/spec/ml_types.h.
| uint32_t odp_ml_shape_info_t::dim[ODP_ML_MAX_DIMS] |
Dimension sizes.
Number of data values in each ('num_dim') dimension. Type of the data is defined by odp_ml_data_type_t enumeration. Depending on the shape type, some dimensions may have dynamic size which is denoted with ODP_ML_DIM_DYNAMIC value. When shape type is ODP_ML_SHAPE_BATCH, the shape has one dynamic dimension which is used as the batch size.
For example, a static (ODP_ML_SHAPE_STATIC) NCHW tensor could be presented as:
... and with dynamic batch size (ODP_ML_SHAPE_BATCH):
Definition at line 505 of file api/spec/ml_types.h.
| uint32_t odp_ml_shape_info_t::dim_min[ODP_ML_MAX_DIMS] |
Minimum dimension sizes.
Defines the minimum value for each dynamic size (ODP_ML_DIM_DYNAMIC) in dim[] array. Zero is used when the minimum value is unknown. When dimension size is static, the value is equal to dim[] array value.
Definition at line 513 of file api/spec/ml_types.h.
| uint32_t odp_ml_shape_info_t::dim_max[ODP_ML_MAX_DIMS] |
Maximum dimension sizes.
Defines the maximum value for each dynamic size (ODP_ML_DIM_DYNAMIC) in dim[] array. Zero is used when the maximum value is unknown. When dimension size is static, the value is equal to dim[] array value.
Definition at line 521 of file api/spec/ml_types.h.
| char odp_ml_shape_info_t::dim_name[ODP_ML_MAX_DIMS][ODP_ML_SHAPE_NAME_LEN] |
Dimension name.
Name of each ('num_dim') dimension as a null terminated string. Null string is used if a dimension does not have a name. Maximum string length is ODP_ML_SHAPE_NAME_LEN including the null character.
For example, an NCHW tensor could have dimensions named as: dim_name = {"N", "C", "H", "W"}
Definition at line 532 of file api/spec/ml_types.h.