MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / linear_geglu

Function linear_geglu

k_diffusion/models/modules.py:94–99  ·  view source on GitHub ↗
(x, weight, bias=None)

Source from the content-addressed store, hash-verified

92
93@flags.compile_wrap
94def linear_geglu(x, weight, bias=None):
95 x = x @ weight.mT
96 if bias is not None:
97 x = x + bias
98 x, gate = x.chunk(2, dim=-1)
99 return x * F.gelu(gate)
100
101
102@flags.compile_wrap

Callers 1

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected