Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Commit 1135e18

Browse files
bug fix to sampler
1 parent 71f8e0a commit 1135e18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dataloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ def __iter__(self):
447447

448448
def __len__(self):
449449
if self.drop_last:
450-
return len(self.sampler) // self.batch_size
450+
return len(self.data_source) // self.batch_size
451451
else:
452-
return (len(self.sampler) + self.batch_size - 1) // self.batch_size
452+
return (len(self.data_source) + self.batch_size - 1) // self.batch_size
453453

454454
def group_images(self):
455455
# determine the order of the images

0 commit comments

Comments
 (0)