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

Method __init__

k_diffusion/models/modules.py:495–500  ·  view source on GitHub ↗
(self, d_model, d_ff, cond_features, dropout=0.0)

Source from the content-addressed store, hash-verified

493
494class FeedForwardBlock(nn.Module):
495 def __init__(self, d_model, d_ff, cond_features, dropout=0.0):
496 super().__init__()
497 self.norm = AdaRMSNorm(d_model, cond_features)
498 self.up_proj = apply_wd(LinearGEGLU(d_model, d_ff, bias=False))
499 self.dropout = nn.Dropout(dropout)
500 self.down_proj = apply_wd(zero_init(Linear(d_ff, d_model, bias=False)))
501
502 def forward(self, x, cond):
503 skip = x

Callers

nothing calls this directly

Calls 6

AdaRMSNormClass · 0.85
apply_wdFunction · 0.85
LinearGEGLUClass · 0.85
zero_initFunction · 0.85
LinearClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected