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

Method __init__

mogen/models/utils/stylization_block.py:16–27  ·  view source on GitHub ↗
(self, latent_dim, time_embed_dim, dropout)

Source from the content-addressed store, hash-verified

14class StylizationBlock(nn.Module):
15
16 def __init__(self, latent_dim, time_embed_dim, dropout):
17 super().__init__()
18 self.emb_layers = nn.Sequential(
19 nn.SiLU(),
20 nn.Linear(time_embed_dim, 2 * latent_dim),
21 )
22 self.norm = nn.LayerNorm(latent_dim)
23 self.out_layers = nn.Sequential(
24 nn.SiLU(),
25 nn.Dropout(p=dropout),
26 zero_module(nn.Linear(latent_dim, latent_dim)),
27 )
28
29 def forward(self, h, emb):
30 """

Callers

nothing calls this directly

Calls 1

zero_moduleFunction · 0.70

Tested by

no test coverage detected