MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / __init__

Method __init__

mogen/models/transformers/remodiffuse.py:17–22  ·  view source on GitHub ↗
(self, latent_dim, ffn_dim, dropout)

Source from the content-addressed store, hash-verified

15class FFN(nn.Module):
16
17 def __init__(self, latent_dim, ffn_dim, dropout):
18 super().__init__()
19 self.linear1 = nn.Linear(latent_dim, ffn_dim)
20 self.linear2 = zero_module(nn.Linear(ffn_dim, latent_dim))
21 self.activation = nn.GELU()
22 self.dropout = nn.Dropout(dropout)
23
24 def forward(self, x, **kwargs):
25 y = self.linear2(self.dropout(self.activation(self.linear1(x))))

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

zero_moduleFunction · 0.90

Tested by

no test coverage detected