(self, x, mask=None)
| 404 | self.dropout_2 = nn.Dropout(dropout) |
| 405 | |
| 406 | def forward(self, x, mask=None): |
| 407 | x2 = self.norm_1(x) |
| 408 | x = x + self.dropout_1(self.attn(x2, x2, x2, mask)) |
| 409 | x2 = self.norm_2(x) |
| 410 | x = x + self.dropout_2(self.ff(x2)) |
| 411 | return x |
| 412 | |
| 413 | |
| 414 | # build a decoder layer with two multi-head attention layers and |
nothing calls this directly
no outgoing calls
no test coverage detected