---
title: GetExpandDimsRule
description: "获取Tensor的补维规则。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00433.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00433.html
indexId: 294a812ea2acc41714c18e76ebd541c32d2a599083ff189d0a8eed0af566337078
---
# GetExpandDimsRule

#### 函数功能

获取Tensor的补维规则。


#### 函数原型

```
graphStatus GetExpandDimsRule(AscendString &expand_dims_rule) const
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| expand\_dims\_rule | 引用输入 | 获取到的补维规则，作为出参。 |


#### 返回值

graphStatus类型：获取成功返回GRAPH_SUCCESS，否则，返回GRAPH_FAILED。


#### 异常处理

无。


#### 约束说明

无。
