Rémi Louf
a0dcefa382
generalize BertSelfAttention to take separate query, key, value
...
There is currently no way to specify the quey, key and value separately
in the Attention module. However, the decoder's "encoder-decoder
attention" layers take the decoder's last output as a query, the
encoder's states as key and value. We thus modify the existing code so
query, key and value can be added separately.
This obviously poses some naming conventions; `BertSelfAttention` is not
a self-attention module anymore. The way the residual is forwarded is
now awkard, etc. We will need to do some refacto once the decoder is
fully implemented.
2019-10-07 17:53:58 +02:00
..
2019-09-27 17:32:28 +02:00
2019-10-07 12:04:05 +02:00
2019-09-29 19:51:01 -04:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-10-03 10:27:11 -04:00
2019-09-26 12:02:54 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-10-03 10:27:11 -04:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-10-07 17:53:58 +02:00
2019-10-03 15:51:33 -04:00
2019-10-03 10:27:11 -04:00
2019-09-26 10:15:53 +02:00
2019-09-27 19:03:55 -04:00
2019-10-07 13:00:06 +02:00
2019-09-26 10:15:53 +02:00
2019-10-02 15:04:18 +00:00
2019-10-03 15:51:33 -04:00
2019-10-03 10:27:11 -04:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-10-02 15:04:18 +00:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-10-01 18:17:48 -04:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-09-26 10:15:53 +02:00
2019-10-03 10:27:11 -04:00
2019-09-26 10:15:53 +02:00
2019-09-27 17:02:53 -04:00
2019-09-26 10:15:53 +02:00
2019-10-04 14:27:38 -04:00
2019-09-26 10:15:53 +02:00
2019-09-26 12:02:54 +02:00