def gelu_tanh_of
import stelliferous@0.0.2.0/math_activation.bend as MathActivationimport Base
63# PyTorch's gelu(approximate='tanh'): 0.5 x (1 + tanh(sqrt(2/pi) (x + 0.044715 x^3))).
64def gelu_tanh_of(+value: F32) -> F32:
65 +cube = ((value * value : F32) * value : F32)
66 ((0.5 * value : F32) * (1.0 + tanh_value((0.7978845608 * (value + (0.044715 * cube : F32) : F32) : F32)) : F32) : F32)