---
title: Reshape
description: "改变输入tensor的shape。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0110.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0110.html
indexId: b23bc8fa46273cfaf0c5f0794051735f422e7a7424da1023274d0b24bc3acb3564
---
# Reshape

#### 功能说明

改变输入tensor的shape。


#### 定义

```
virtual Status Reshape (const std::string &srcTensorName, const ReshapeFunc &reshapeFunc, const std::string &viewTensorName)=0
```


#### 成员

| 成员名称 | 描述 |
| --- | --- |
| srcTensorName | 输入tensor的名称。 |
| reshapeFunc | shape修改规则。 |
| viewTensorName | shape修改后的tensor名称。 |


#### 返回值

状态值。如果设置成功，返回NO_ERROR。
