| 543 | |
| 544 | |
| 545 | class NoAttentionTransformerLayer(nn.Module): |
| 546 | def __init__(self, d_model, d_ff, cond_features, dropout=0.0): |
| 547 | super().__init__() |
| 548 | self.ff = FeedForwardBlock(d_model, d_ff, cond_features, dropout=dropout) |
| 549 | |
| 550 | def forward(self, x, pos, cond): |
| 551 | x = checkpoint(self.ff, x, cond) |
| 552 | return x |
| 553 | |
| 554 | |
| 555 | class Level(nn.ModuleList): |