| 31 | return x + skip |
| 32 | |
| 33 | class ApplyVectorWeights(nn.Module): |
| 34 | def __init__(self): |
| 35 | super(ApplyVectorWeights, self).__init__() |
| 36 | |
| 37 | def forward(self, x: Tensor, weights: Tensor) -> Tensor: |
| 38 | return x * weights |
| 39 | |
| 40 | class ChannelEmbeddingCompression(nn.Module): |
| 41 | def __init__(self, embed_dim, embed_dim_next): |