(self, dim, dropout=0)
| 49 | """ |
| 50 | |
| 51 | def __init__(self, dim, dropout=0): |
| 52 | super(AdditiveAttention, self).__init__() |
| 53 | self.w_attention_matrix = init_tensor(torch.empty(dim, dim)) |
| 54 | self.u_attention_matrix = init_tensor(torch.empty(dim, dim)) |
| 55 | self.v_attention_vector = init_tensor(torch.empty(dim, 1)) |
| 56 | |
| 57 | self.dropout = torch.nn.Dropout(p=dropout) |
| 58 | |
| 59 | def forward(self, s, h): |
| 60 | raise NotImplementedError |
nothing calls this directly
no test coverage detected