diff --git a/ptp/components/text/sentence_indexer.py b/ptp/components/text/sentence_indexer.py index 2132b63..b13c83b 100644 --- a/ptp/components/text/sentence_indexer.py +++ b/ptp/components/text/sentence_indexer.py @@ -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) @@ -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)