---
title: BatchConcat
description: "将多个Tensor进行组batch，按照batch维组装，默认输入的每个Tensor第一维为batch维，内存连续。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/msadg/mxvisionug_0765.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/msadg/mxvisionug_0765.html
indexId: 0846b7c2ca571f7637086470116886d7d371f084902d8fc6bf10bc3852ea6fe4102
---
# BatchConcat

#### 函数功能

将多个Tensor进行组batch，按照batch维组装，默认输入的每个Tensor第一维为batch维，内存连续。


#### 函数原型

```
friend APP_ERROR BatchConcat(const std::vector<Tensor> &inputs, Tensor &output)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| inputs | 输入 | 待组batch的Tensor列表。 |
| output | 输出 | 组装好batch的Tensor。 |


#### 返回参数说明

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