---
title: 输入输出
description: "| 参数 | 维度 | 数据类型 | 格式 | 描述 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0131.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0131.html
indexId: e1c617a64d7fec96bb7ffdced89688380d84021ba44aa9192ee0ca969443212b64
---
# 输入输出

#### RELU激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x | [dim\_0, dim\_1, ..., dim\_n] | float/bf16 | ND | 输入 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float/bf16 | ND | 输出 和输入维度/类型/格式相同。 |


#### FAST_GELU激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x | [dim\_0, dim\_1, ..., dim\_n] | float16/bf16 | ND | 输入 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float16/bf16 | ND | 输出 和输入维度/类型/格式相同。 |


#### LOG激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输入 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输出 和输入维度/类型/格式相同。 |


#### SIGMOID激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x | [dim\_0, dim\_1, ..., dim\_n] | float16/bf16 | ND | 输入 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float16/bf16 | ND | 输出 和输入维度/类型/格式相同。 |
| Atlas 200I/500 A2 推理产品 上仅支持float16数据类型。 | Atlas 200I/500 A2 推理产品 上仅支持float16数据类型。 | Atlas 200I/500 A2 推理产品 上仅支持float16数据类型。 | Atlas 200I/500 A2 推理产品 上仅支持float16数据类型。 | Atlas 200I/500 A2 推理产品 上仅支持float16数据类型。 |


#### SWISH激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x | [dim\_0, dim\_1, ..., dim\_n] | float16/bf16 | ND | 输入 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float16/bf16 | ND | 输出 和输入维度/类型/格式相同。 |


#### GELU激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输入 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输出 和输入维度/类型/格式相同。 |


#### SWIGLU_FORWARD激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输入 当“activationType”为ACTIVATION\_SWIGLU\_FORWARD时：对于 Atlas 推理系列产品 ，最后一维需为32的倍数。 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输出 和输入维度/类型/格式相同，其dim维所对应的大小是输入的一半。 |


#### SWIGLU_BACKWARD激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| x1 | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输入 当“activationType”为ACTIVATION\_SWIGLU\_BACKWARD时，不支持 Atlas 推理系列产品 。 |
| x2 | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输入 和x1的维度/类型/格式相同，其dim维所对应的大小是输入x1的2倍。 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float16/float/bf16 | ND | 输出 和x1的维度/类型/格式相同，其dim维所对应的大小是输入x1的2倍。 |


#### FASTER_GELU_FORWARD激活类型

| 参数 | 维度 | 数据类型 | 格式 | 描述 |
| --- | --- | --- | --- | --- |
| input | [dim\_0, dim\_1, ..., dim\_n] | float/float16/bf16 | ND | 输入tensor。 |
| output | [dim\_0, dim\_1, ..., dim\_n] | float/float16/bf16 | ND | 输出tensor。维度、数据类型、数据格式与输入tensor一致。 |
