MathActivation.gelu_tanh_of: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/math_activation.bend as MathActivation Lines 63-66 of stelliferous@0.0.2.0/math_activation.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/math_activation.bend&start_line=63&end_line=66 import Base # PyTorch's gelu(approximate='tanh'): 0.5 x (1 + tanh(sqrt(2/pi) (x + 0.044715 x^3))). def gelu_tanh_of(+value: F32) -> F32: +cube = ((value * value : F32) * value : F32) ((0.5 * value : F32) * (1.0 + tanh_value((0.7978845608 * (value + (0.044715 * cube : F32) : F32) : F32)) : F32) : F32) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/math_activation.bend&name=tanh_value