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

#### 产品支持情况

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


#### 函数功能

批量设置指定index的output的tensor。


#### 函数原型

```
set_multi_outputs(self, index, outputs: List[Union[FlowMsg, np.ndarray, fw.FlowMsg]], balance_config: BalanceConfig) -> int
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| index | 输入 | 指定输出的index。 |
| output | 输入 | 指定输出的Msg。 |
| balance\_config | 输入 | 输出均衡分发相关配置。 |


#### 返回值

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


#### 异常处理

无


#### 约束说明

无
