From 5fca831ccd986bb9cb8b1b21b5c553c663b5cbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Koz=C5=82owski?= Date: Tue, 24 Jan 2023 18:17:40 +0100 Subject: [PATCH] fixlen --- utils/donut_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: