---
title: BatchStack
description: "将多batch的Tensor组合成一个Tensor，相比于BatchConcat拓展了Tensor的维度。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/msadg/mxvisionug_0446.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/msadg/mxvisionug_0446.html
indexId: 9f4b0e6a1b4a92e2b627426b5ea8986ab38638ce6e9c15c6a56900b512355bae102
---
# BatchStack

#### 函数功能

将多batch的Tensor组合成一个Tensor，相比于BatchConcat拓展了Tensor的维度。


#### 函数原型

```
static APP_ERROR BatchStack(const std::vector<TensorBase> &inputs, TensorBase &output);
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| inputs | 输入 | Tensor列表，列表大小不超过1024。 |
| output | 输出 | 组合后的Tensor对象。 |


#### 返回参数说明

| 数据结构 | 说明 |
| --- | --- |
| APP\_ERROR | 程序执行返回的错误码，请参考APP\_ERROR说明。 |
