We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7842c3e commit 4aff146Copy full SHA for 4aff146
torchvision/datasets/mnist.py
@@ -81,9 +81,9 @@ def __getitem__(self, index):
81
82
def __len__(self):
83
if self.train:
84
- return 60000
+ return len(self.train_data)
85
else:
86
- return 10000
+ return len(self.test_data)
87
88
def _check_exists(self):
89
return os.path.exists(os.path.join(self.root, self.processed_folder, self.training_file)) and \
0 commit comments