Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Update namedtuple
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrochukM committed Oct 21, 2019
1 parent 0924ec7 commit f1b8144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchnlp/encoders/text/text_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def pad_tensor(tensor, length, padding_index=DEFAULT_PADDING_INDEX):
return torch.cat((tensor, padding), dim=0)


BatchedSequences = namedtuple('BatchedSequences', ['sequences', 'lengths'])
BatchedSequences = namedtuple('BatchedSequences', ['tensor', 'lengths'])


def stack_and_pad_tensors(batch, padding_index=DEFAULT_PADDING_INDEX, dim=0):
Expand Down

0 comments on commit f1b8144

Please sign in to comment.