MCPcopy Create free account
hub / github.com/Gadersd/stable-diffusion-burn / FeedForward

Class FeedForward

python/dump.py:212–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210 return x * gate.gelu()
211
212class FeedForward:
213 def __init__(self, dim, mult=4):
214 self.net = [
215 GEGLU(dim, dim*mult),
216 lambda x: x, # needed for weights loading code to work
217 Linear(dim*mult, dim)
218 ]
219
220 def __call__(self, x):
221 return x.sequential(self.net)
222
223class BasicTransformerBlock:
224 def __init__(self, dim, context_dim, n_heads, d_head):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected