diff --git a/utils/donut_dataset.py b/utils/donut_dataset.py index 0474a87..6319a0e 100644 --- a/utils/donut_dataset.py +++ b/utils/donut_dataset.py @@ -48,7 +48,7 @@ class DonutDataset(Dataset): self.added_tokens = added_tokens self.dataset = dataset - self.dataset_length = len(list(self.dataset)) + self.dataset_length = len(self.dataset) self.gt_token_sequences = [] for sample in self.dataset: