Skip to content

add: padding_value to torch.nn.utils.rnn.pad_sequence#5540

Merged
apaszke merged 7 commits intopytorch:masterfrom
Evpok:master
Mar 5, 2018
Merged

add: padding_value to torch.nn.utils.rnn.pad_sequence#5540
apaszke merged 7 commits intopytorch:masterfrom
Evpok:master

Conversation

@Evpok
Copy link
Copy Markdown
Contributor

@Evpok Evpok commented Mar 3, 2018

Implement #5532

Comment thread torch/nn/utils/rnn.py Outdated
sequences (list[Variable]): list of variable length sequences.
batch_first (bool, optional): output will be in BxTx* if True, or in
TxBx* otherwise
padding_value (optional): values for padded elements.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@apaszke
Copy link
Copy Markdown
Contributor

apaszke commented Mar 4, 2018

I changed the float 0. to 0. We're sometimes quite strict in handling float -> int conversions, so it's better to keep it this way. Can you please add some simple tests for this feature?

@apaszke
Copy link
Copy Markdown
Contributor

apaszke commented Mar 4, 2018

@pytorchbot test this please

@apaszke apaszke merged commit c930764 into pytorch:master Mar 5, 2018
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants