Mish

Mish - 22

版本

  • 名称: Mish (GitHub)

  • 域名: main

  • since_version: 22

  • function: True

  • support_level: SupportType.COMMON

  • 形状推断: True

此版本的运算符自版本22起可用。

摘要

Mish:一种自正则化的非单调神经激活函数。

对输入张量 X 使用公式逐元素执行线性单元:

mish(x) = x * tanh(softplus(x)) = x * tanh(ln(1 + e^{x}))

函数体

此运算符的函数定义。

<
  domain: "",
  opset_import: ["" : 22]
>
Mish (X) => (Y)
{
   Softplus_X = Softplus (X)
   TanHSoftplusX = Tanh (Softplus_X)
   Y = Mul (X, TanHSoftplusX)
}

输入

  • X (异构) - T:

    输入张量

输出

  • Y (异构) - T:

    输出张量

类型约束

  • T 在 ( tensor(bfloat16), tensor(double), tensor(float), tensor(float16) ):

    将输入X和输出类型限制为浮点张量。

Mish - 18

版本

  • 名称: Mish (GitHub)

  • 域名: main

  • since_version: 18

  • function: True

  • support_level: SupportType.COMMON

  • 形状推断: True

此版本的运算符自版本18起可用。

摘要

Mish:一种自正则化的非单调神经激活函数。

对输入张量X使用公式执行线性单元元素级操作:

mish(x) = x * tanh(softplus(x)) = x * tanh(ln(1 + e^{x}))

函数体

此运算符的函数定义。

<
  domain: "",
  opset_import: ["" : 18]
>
Mish (X) => (Y)
{
   Softplus_X = Softplus (X)
   TanHSoftplusX = Tanh (Softplus_X)
   Y = Mul (X, TanHSoftplusX)
}

输入

  • X (异构) - T:

    输入张量

输出

  • Y (异构) - T:

    输出张量

类型约束

  • T 在 ( tensor(double), tensor(float), tensor(float16) ) 中:

    将输入X和输出类型限制为浮点张量。