Skip to content

Commit 01d6ccb

Browse files
authored
Merge pull request #5763 from ranqiu92/dot_product_attention
update the dot_product_attention.
2 parents c6ec26d + 81abcde commit 01d6ccb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/paddle/trainer_config_helpers/networks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,10 +1476,8 @@ def dot_product_attention(encoded_sequence,
14761476
expand_as=encoded_sequence,
14771477
name='%s_expand' % name)
14781478

1479-
m = linear_comb_layer(
1480-
weights=expanded,
1481-
vectors=encoded_sequence,
1482-
name='%s_dot-product' % name)
1479+
m = dot_prod_layer(
1480+
input1=expanded, input2=encoded_sequence, name='%s_dot-product' % name)
14831481

14841482
attention_weight = fc_layer(
14851483
input=m,

0 commit comments

Comments
 (0)