Mish#

  • Domain: ai.onnx

  • Since version: 22

Mish: A Self Regularized Non-Monotonic Neural Activation Function.

Perform the linear unit element-wise on the input tensor X using formula:

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

Inputs

  • X (T): Input tensor

Outputs

  • Y (T): Output tensor

Type Constraints

  • T: Constrain input X and output types to float tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16).

Examples#

test_cc_mish

Node:
  Mish(X) -> (Y)
Inputs:
  X: shape=(2, 3), dtype=float32
    [[-4., -1.,  0.],
     [ 1.,  2.,  4.]]

Outputs:
  Y: shape=(2, 3), dtype=float32
    [[-0.07259175, -0.30340144,  0.        ],
     [ 0.8650984 ,  1.943959  ,  3.997413  ]]

Differences with previous version (18)#

SchemaDiff: Mish (domain 'ai.onnx')

  • old version: 18

  • new version: 22

  • breaking: no

Type constraints:

  • changed ‘T’: added types: [‘tensor(bfloat16)’]

Version History#