---
title: GetOriginalShape
description: "获取aclTensor的OriginShape属性。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/aolapi/atlasascendc_api_07_1070.html
sourcePath: /source/zh/canncommercial/900/API/aolapi/atlasascendc_api_07_1070.html
indexId: 07f596c623dc7e2c4d3c2fedfb692ef516816e8ff42e5eb7967879b73a66a2a270
---
# GetOriginalShape

#### 功能说明

获取aclTensor的OriginShape属性。

OriginShape表示aclTensor在经历transdata节点前（如果存在该节点）的原始shape信息，即tensor的shape数学描述。


#### 函数原型

```
gert::Shape GetOriginalShape()
```


#### 参数说明

无


#### 返回值说明

返回值为gert::Shape，记录了一组shape信息，例如一个三维shape：[10, 20, 30]。

gert::Shape介绍参见《基础数据结构和接口(https://www.hiascend.com/document/detail/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00001.html)》中“gert::Shape(https://www.hiascend.comdocument/detail/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00149.html)”。


#### 约束说明

无


#### 调用示例

```
void Func(const aclTensor *input) {
    auto shape = input->GetOriginalShape();
}
```
