Commit 0520ae59 authored by Eren Doğan's avatar Eren Doğan Committed by GitHub

fix __len__

parent 39518025
......@@ -68,7 +68,7 @@ class ShardedImageDataset(data.Dataset):
self.executor = concurrent.futures.ThreadPoolExecutor(max_workers=self.threads)
def __len__(self):
return len(self.metadata) // (self.bsz * self.world_size)
return len(self.metadata) // self.bsz
def __getitem__(self, key):
key = self.skip + key
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment