MCPcopy Create free account
hub / github.com/Derious/cuMPC / GeLU1

Function GeLU1

test/test_CORE/test_lut.cpp:34–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34float GeLU1(float x) {
35 return 0.5 * x * (1 + std::erf(x / std::sqrt(2.0)));
36}
37
38//def gelu(x):return 0.5*x*(1+np.tanh(np.sqrt(2/np.pi)*(x+0.044715*np.power(x, 3))))
39float GeLU(float x) {

Callers

nothing calls this directly

Calls 2

erfFunction · 0.85
sqrtFunction · 0.50

Tested by

no test coverage detected