---
title: MutableStorageShape
description: "获取运行时Tensor的形状，此Shape对象是可变的。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00748.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00748.html
indexId: 9fc72972bcf0da4052b07caca85a0472229f0bb3083385a070d3171f9b29383778
---
# MutableStorageShape

#### 函数功能

获取运行时Tensor的形状，此Shape对象是可变的。


#### 函数原型

```
Shape &MutableStorageShape()
```


#### 参数说明

无。


#### 返回值说明

运行时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.MutableStorageShape(); // 2,1,3
```
