Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/THUDM/GLM
/ swish
Function
swish
model/modeling_bert.py:159–160 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
157
158
159
def
swish(x):
160
return
x * torch.sigmoid(x)
161
162
163
ACT2FN = {
"gelu"
: gelu,
"relu"
: torch.nn.functional.relu,
"swish"
: swish}
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected