### Swish activation function $$x \cdot \sigma(x)$$
| 7 | |
| 8 | |
| 9 | class Swish(nn.Module): |
| 10 | """ |
| 11 | ### Swish activation function |
| 12 | $$x \cdot \sigma(x)$$ |
| 13 | """ |
| 14 | |
| 15 | def forward(self, x): |
| 16 | return x * torch.sigmoid(x) |
| 17 | |
| 18 | |
| 19 | class TimeEmbedding(nn.Module): |