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

# Dims

#### 功能说明

Shape维度信息。


#### 定义

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


#### 参数列表

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