Skip to content

Commit

Permalink
!4 update fastNLP/modules/encoder/seq2seq_encoder.py.
Browse files Browse the repository at this point in the history
Merge pull request !4 from 刘向阳/N/A
  • Loading branch information
WillQvQ authored and gitee-org committed Nov 18, 2020
2 parents e4e6597 + 9b7562a commit c49c849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastNLP/modules/encoder/seq2seq_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def forward(self, tokens, seq_len):
x = self.input_fc(x)
x = F.dropout(x, p=self.dropout, training=self.training)

encoder_mask = seq_len_to_mask(seq_len)
encoder_mask = seq_len_to_mask(seq_len, max_len=max_src_len)
encoder_mask = encoder_mask.to(device)

for layer in self.layer_stacks:
Expand Down

0 comments on commit c49c849

Please sign in to comment.