Class GELU

java.lang.Object
io.github.kirstenali.deepj.activations.GELU
All Implemented Interfaces:
ActivationFunction

public final class GELU extends Object implements ActivationFunction
Gaussian Error Linear Unit (GELU), using the tanh approximation popularized by GPT-2.

Forward: x * 0.5 * (1 + tanh(sqrt(2/pi)*(x + 0.044715*x^3))).