diff --git a/utils/donut_dataset_stream.py b/utils/donut_dataset_stream.py index 46ddaaa..27b7971 100644 --- a/utils/donut_dataset_stream.py +++ b/utils/donut_dataset_stream.py @@ -116,8 +116,8 @@ class DonutDataset(Dataset): self.model.decoder.resize_token_embeddings(len(self.processor.tokenizer)) self.added_tokens.extend(list_of_tokens) - # def __len__(self) -> int: - # return self.dataset_length + def __len__(self) -> int: + return self.dataset_length def __getitem__(self, idx: int) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: """