def gelu.f
import bend-ml-tensor@0.1.2.0/main.bend as BendMlTensorimport Base
354# GELU with the tanh approximation (the same as GPT-2)
355def gelu.f(+x: F32) -> F32:
356 (0.5 * (x * (1.0 + F32.tanh((0.7978846 * (x + (0.044715 * (x * (x * x : F32) : F32) : F32) : F32) : F32)) : F32) : F32) : F32)