---
title: MutableOriginShape
description: "获取Tensor的原始shape。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00750.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00750.html
indexId: 6bdd255f1e86824c042c7089d53ba05b5b65592a15a5bff90ebfd447f29b690c78
---
# MutableOriginShape

#### 函数功能

获取Tensor的原始shape。


#### 函数原型

```
Shape &MutableOriginShape()
```


#### 参数说明

无


#### 返回值说明

原始Shape引用。

关于Shape类型的定义，请参见Shape。


#### 约束说明

无


#### 调用示例

```
StorageShape sh({1, 2, 3}, {2, 1, 3});
TensorV2 t = {sh, {ge::FORMAT_ND, ge::FORMAT_FRACTAL_NZ, {}}, kOnHost, ge::DT_FLOAT, nullptr};
auto shape = t.MutableOriginShape(); // 1,2,3
```
