def gelu_inner

bendtorch@1.3.0.0 · main.bend:1093

import bendtorch@1.3.0.0/main.bend as Bendtorch
import Base

1093# GELU in its tanh form (PyTorch's approximate="tanh"): 0.5 x (1 + tanh(sqrt(2/pi) (x + 0.044715 x^3))).
1094# The exact form, with erf, is GELUErf below.
1095def gelu_inner(+x: F32) -> F32:
1096  (0.7978845608028654 * (x + (0.044715 * ((x * x : F32) * x : F32) : F32) : F32) : F32)

Uses (3)

Used by (2)