Skip to content

Commit

Permalink
Fix state_bag parameter in MHA pos encoder (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbalioglu authored Sep 15, 2023
1 parent 7e6b7e2 commit 5301e0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fairseq2/nn/transformer/multihead_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def forward(
v = v.flatten(0, 1)

if self.pos_encoder is not None:
q = self.pos_encoder(q, padding_mask, state_bag)
q = self.pos_encoder(q, padding_mask, state_bag=state_bag)
k = self.pos_encoder(k, key_padding_mask)

mask_pad = 0
Expand Down

0 comments on commit 5301e0a

Please sign in to comment.