(self, latent_dim, ffn_dim, dropout, time_embed_dim, **kwargs)
| 183 | class SFFN(nn.Module): |
| 184 | |
| 185 | def __init__(self, latent_dim, ffn_dim, dropout, time_embed_dim, **kwargs): |
| 186 | super().__init__() |
| 187 | self.linear1_list = nn.ModuleList() |
| 188 | self.linear2_list = nn.ModuleList() |
| 189 | for i in range(8): |
| 190 | self.linear1_list.append(nn.Linear(latent_dim, ffn_dim)) |
| 191 | self.linear2_list.append(nn.Linear(ffn_dim, latent_dim)) |
| 192 | self.activation = nn.GELU() |
| 193 | self.dropout = nn.Dropout(dropout) |
| 194 | self.proj_out = StylizationBlock(latent_dim * 8, time_embed_dim, |
| 195 | dropout) |
| 196 | |
| 197 | def forward(self, x, emb, **kwargs): |
| 198 | B, T, D = x.shape |
no test coverage detected