Commit 4aff146c authored by Keon's avatar Keon Committed by Soumith Chintala
Browse files

Return real dataset length (#210)

parent 7842c3ed
...@@ -81,9 +81,9 @@ class MNIST(data.Dataset): ...@@ -81,9 +81,9 @@ class MNIST(data.Dataset):
def __len__(self): def __len__(self):
if self.train: if self.train:
return 60000 return len(self.train_data)
else: else:
return 10000 return len(self.test_data)
def _check_exists(self): def _check_exists(self):
return os.path.exists(os.path.join(self.root, self.processed_folder, self.training_file)) and \ return os.path.exists(os.path.join(self.root, self.processed_folder, self.training_file)) and \
......
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