---
title: Dims
description: "Shape维度信息。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0009.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0009.html
indexId: 9bfa7e5171694a1e9a5c4b433b6bba6b2e4483dfd654cd3d4f61c0b73f1e3d8264
---
# Dims

#### 功能说明

Shape维度信息。


#### 定义

```
struct Dims {
    int64_t dims[MAX_DIM];
    uint64_t dimNum = 0;
};
```


#### 参数列表

| 成员名称 | 数据类型 | 默认值 | 描述 |
| --- | --- | --- | --- |
| dims | int64\_t | \- | 每一维的大小，要求大于0。 |
| dimNum | uint64\_t | 0 | Tensor的维数，取值范围为(0, 8]。此默认值不可用，用户须配置此项参数。 |
