(self, seq_len, latent_dim, text_latent_dim, num_head, dropout, time_embed_dim)
| 229 | class TemporalCrossAttention(nn.Module): |
| 230 | |
| 231 | def __init__(self, seq_len, latent_dim, text_latent_dim, num_head, dropout, time_embed_dim): |
| 232 | super().__init__() |
| 233 | self.num_head = num_head |
| 234 | self.norm = nn.LayerNorm(latent_dim) |
| 235 | self.text_norm = nn.LayerNorm(text_latent_dim) |
| 236 | self.query = nn.Linear(latent_dim, latent_dim) |
| 237 | self.key = nn.Linear(text_latent_dim, latent_dim) |
| 238 | self.value = nn.Linear(text_latent_dim, latent_dim) |
| 239 | self.dropout = nn.Dropout(dropout) |
| 240 | self.proj_out = StylizationBlock(latent_dim, time_embed_dim, dropout) |
| 241 | |
| 242 | def forward(self, x, xf, emb): |
| 243 | """ |
nothing calls this directly
no test coverage detected