This commit is contained in:
Michał Kozłowski 2023-01-25 21:45:22 +01:00
parent ecce4427a5
commit c4fec90d13

View File

@ -116,8 +116,8 @@ class DonutDataset(Dataset):
self.model.decoder.resize_token_embeddings(len(self.processor.tokenizer)) self.model.decoder.resize_token_embeddings(len(self.processor.tokenizer))
self.added_tokens.extend(list_of_tokens) self.added_tokens.extend(list_of_tokens)
# def __len__(self) -> int: def __len__(self) -> int:
# return self.dataset_length return self.dataset_length
def __getitem__(self, idx: int) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: def __getitem__(self, idx: int) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
""" """