(self, x: torch.Tensor)
| 97 | self.dropout_layer = nn.Dropout(dropout) if dropout > 0 else None |
| 98 | |
| 99 | def forward(self, x: torch.Tensor) -> torch.Tensor: |
| 100 | x = self.encoder(x) |
| 101 | x = self.activation(x) |
| 102 | x = self.decoder(x) |
| 103 | if self.dropout_layer is not None: |
| 104 | x = self.dropout_layer(x) |
| 105 | return x |
| 106 | |
| 107 | |
| 108 | class SelfAttention(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected