Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
remove duplicate padding calculations in collate fn (#4617)
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored Sep 1, 2020
1 parent de9165e commit 319794a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion allennlp/data/data_loaders/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def allennlp_collate(instances: List[Instance]) -> TensorDict:
batch.
"""
batch = Batch(instances)
return batch.as_tensor_dict(batch.get_padding_lengths())
return batch.as_tensor_dict()


class DataLoader(Registrable):
Expand Down

0 comments on commit 319794a

Please sign in to comment.