This commit is contained in:
Eren Golge 2019-04-30 10:59:29 +02:00
parent 8f6721a1ff
commit afb5a17221
1 changed files with 1 additions and 0 deletions

View File

@ -251,6 +251,7 @@ class Attention(nn.Module):
else:
context = torch.bmm(alignment.unsqueeze(1), inputs)
context = context.squeeze(1)
self.attention_weights = alignment
return context