Skip to content

Commit

Permalink
Remove masking on decoding attention
Browse files Browse the repository at this point in the history
  • Loading branch information
brainsqueeze committed Dec 31, 2019
1 parent 898445a commit 213b436
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="text2vec",
version="0.1",
version="0.1.1",
description="Building blocks for text vectorization and embedding",
author="Dave Hollander",
author_url="https://github.com/brainsqueeze",
Expand Down
2 changes: 1 addition & 1 deletion text2vec/models/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __call__(self, x_enc, enc_mask, x_dec, dec_mask, context, attention, embeddi
x_dec = self.h_dropout(mha([x_dec] * 3, mask_future=True, training=training), training=training) + x_dec
x_dec = self.layer_norm(x_dec)

cross_context = attention(encoded=x_enc * enc_mask, decoded=x_dec * dec_mask)
cross_context = attention(encoded=x_enc, decoded=x_dec)
x_dec = self.h_dropout(self.projection(x_dec, projection_vector=cross_context), training=training) + x_dec

x_dec = self.layer_norm(x_dec)
Expand Down

0 comments on commit 213b436

Please sign in to comment.