torch format for dataset
This commit is contained in:
parent
5fca831ccd
commit
0466f8f60e
@ -48,7 +48,7 @@ class DonutDataset(Dataset):
|
|||||||
self.added_tokens = added_tokens
|
self.added_tokens = added_tokens
|
||||||
|
|
||||||
self.dataset = dataset
|
self.dataset = dataset
|
||||||
self.dataset_length = len(self.dataset)
|
self.dataset_length = len(self.dataset.with_format("torch"))
|
||||||
|
|
||||||
self.gt_token_sequences = []
|
self.gt_token_sequences = []
|
||||||
for sample in self.dataset:
|
for sample in self.dataset:
|
||||||
|
Loading…
Reference in New Issue
Block a user