Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SooLab/CGFormer
/ gelu_fast
Function
gelu_fast
bert/activations.py:38–39 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
36
37
38
def
gelu_fast(x):
39
return
0.5 * x * (1.0 + torch.tanh(x * 0.7978845608 * (1.0 + 0.044715 * x * x)))
40
41
42
ACT2FN = {
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected