fix len
This commit is contained in:
parent
ecce4427a5
commit
c4fec90d13
@ -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]:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user