MCPcopy Create free account
hub / github.com/cubiq/ComfyUI_IPAdapter_plus / FeedForward

Function FeedForward

image_proj_models.py:9–16  ·  view source on GitHub ↗
(dim, mult=4)

Source from the content-addressed store, hash-verified

7
8# FFN
9def FeedForward(dim, mult=4):
10 inner_dim = int(dim * mult)
11 return nn.Sequential(
12 nn.LayerNorm(dim),
13 nn.Linear(dim, inner_dim, bias=False),
14 nn.GELU(),
15 nn.Linear(inner_dim, dim, bias=False),
16 )
17
18
19def reshape_tensor(x, heads):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected