Versioned name: GELU-2

Category: Activation

Short description: Reference

OpenVINO description: This OP is as same as OpenVINO OP

Detailed description: Reference

Attributes: Gelu operation has no attributes.

Mathematical Formulation \(Gelu(x)=x*Φ(x)\), where \(Φ(x)\) is the Cumulative Distribution Function for Gaussian Distribution. The following equivalent combination is recognized and fused into single Gelu op:

\[Gelu(x) = 0.5*x*(1.0 + erf((x) / \sqrt{2})\]

Similarly, the following Gelu approximation (typical for the TensorFlow*) is recognized and fused into single Gelu op

\[Gelu(x) \approx 0.5x(1.0 + tanh(\sqrt{2.0/pi} * (x + 0.044715 * x ^ 3))\]


  • 1: Multidimensional input tensor. Required.


  • 1: Result of GELU function applied to the input tensor x. Required.