Class FusedGELUOp
- Namespace
- AiDotNet.JitCompiler.IR.Operations
- Assembly
- AiDotNet.dll
Fused GELU activation operation.
public class FusedGELUOp : IROp
- Inheritance
-
FusedGELUOp
- Inherited Members
Remarks
For Beginners: Gaussian Error Linear Unit.
GELU(x) = x * Phi(x), where Phi is the standard Gaussian CDF. Approximation: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
Very popular in transformers (BERT, GPT, etc.)
Properties
Approximate
Whether to use the approximate version.
public bool Approximate { get; set; }
Property Value
Methods
Validate()
Validates inputs (single input).
public override bool Validate()