---
title: Reshape
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefc_23_00067.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefc_23_00067.html
indexId: f24e6a542fbe2af6a56e8e27f130b81736abb6814260739f8014704dfcabfa7a71
---
# Reshape

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

对Tensor进行Reshape操作，不改变Tensor的内容。


#### 函数原型

```
int32_t Reshape(const std::vector<int64_t> &shape)
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| shape | 输入 | 要改变的目标shape。 要求shape元素个数必须和原来shape的个数一致。 |


#### 返回值

- 0：SUCCESS。
- other：FAILED，具体请参考错误码。


#### 异常处理

无。


#### 约束说明

如果对输入进行Reshape动作，可能会影响其他使用本输入的节点正常执行。
