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

# 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。
