Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions ptp/components/text/sentence_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ def tensor_indices_to_sentences(self, data_dict):
# Add index to outputs.
output_sample.append( output_word )

# Apply fixed padding to all sequences if requested
# Otherwise let torch.nn.utils.rnn.pad_sequence handle it and choose a dynamic padding
if self.fixed_padding > 0:
pad_trunc_list(output_sample, self.fixed_padding)

# Add sentence to batch.
outputs_list.append(output_sample)

Expand Down Expand Up @@ -228,11 +223,6 @@ def tensor_distributions_to_sentences(self, data_dict):
# Add index to outputs.
output_sample.append( output_word )

# Apply fixed padding to all sequences if requested
# Otherwise let torch.nn.utils.rnn.pad_sequence handle it and choose a dynamic padding
if self.fixed_padding > 0:
pad_trunc_list(output_sample, self.fixed_padding)

# Add sentence to batch.
outputs_list.append(output_sample)

Expand Down