Skip to content

Commit 85bb16a

Browse files
keonsoumith
authored andcommitted
Cifar also returns real data length (#211)
1 parent 4aff146 commit 85bb16a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/datasets/cifar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ def __getitem__(self, index):
128128

129129
def __len__(self):
130130
if self.train:
131-
return 50000
131+
return len(self.train_data)
132132
else:
133-
return 10000
133+
return len(self.test_data)
134134

135135
def _check_integrity(self):
136136
root = self.root

0 commit comments

Comments
 (0)