Skip to content

Sorting before pack_padded_sequence is unnecessary #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
eridgd opened this issue Jun 8, 2019 · 0 comments
Open

Sorting before pack_padded_sequence is unnecessary #2

eridgd opened this issue Jun 8, 2019 · 0 comments

Comments

@eridgd
Copy link

eridgd commented Jun 8, 2019

As of PyTorch 1.1.0, the inputs to pack_padded_sequence do not need to be sorted by length if enforce_sorted=False:

https://pytorch.org/docs/master/nn.html#torch.nn.utils.rnn.pack_padded_sequence

enforce_sorted (bool, optional) – if True, the input is expected to contain sequences sorted by length in a decreasing order. If False, this condition is not checked. Default: True.

Thanks for the great tutorial!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant