(self, x)
| 147 | self.register_buffer('pe', pe) |
| 148 | |
| 149 | def forward(self, x): |
| 150 | x = x + Variable(self.pe[:, :x.size(1)], |
| 151 | requires_grad=False) |
| 152 | return self.dropout(x) |
| 153 | |
| 154 | |
| 155 | class MultiHeadedAttention(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected