Skip to content

Commit 4628481

Browse files
ZJUGuoShuaipmeier
andauthored
Fix docs of MNIST and its derivatives (#4579)
We no longer cache the data in a custom binary, but simply read from the raw data directly. Co-authored-by: Philip Meier <[email protected]>
1 parent e08c9e3 commit 4628481

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

torchvision/datasets/mnist.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class MNIST(VisionDataset):
1919
"""`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset.
2020
2121
Args:
22-
root (string): Root directory of dataset where ``MNIST/processed/training.pt``
23-
and ``MNIST/processed/test.pt`` exist.
24-
train (bool, optional): If True, creates dataset from ``training.pt``,
25-
otherwise from ``test.pt``.
26-
download (bool, optional): If true, downloads the dataset from the internet and
22+
root (string): Root directory of dataset where ``MNIST/raw/train-images-idx3-ubyte``
23+
and ``MNIST/raw/t10k-images-idx3-ubyte`` exist.
24+
train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
25+
otherwise from ``t10k-images-idx3-ubyte``.
26+
download (bool, optional): If True, downloads the dataset from the internet and
2727
puts it in root directory. If dataset is already downloaded, it is not
2828
downloaded again.
2929
transform (callable, optional): A function/transform that takes in an PIL image
@@ -201,11 +201,11 @@ class FashionMNIST(MNIST):
201201
"""`Fashion-MNIST <https://github.com/zalandoresearch/fashion-mnist>`_ Dataset.
202202
203203
Args:
204-
root (string): Root directory of dataset where ``FashionMNIST/processed/training.pt``
205-
and ``FashionMNIST/processed/test.pt`` exist.
206-
train (bool, optional): If True, creates dataset from ``training.pt``,
207-
otherwise from ``test.pt``.
208-
download (bool, optional): If true, downloads the dataset from the internet and
204+
root (string): Root directory of dataset where ``FashionMNIST/raw/train-images-idx3-ubyte``
205+
and ``FashionMNIST/raw/t10k-images-idx3-ubyte`` exist.
206+
train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
207+
otherwise from ``t10k-images-idx3-ubyte``.
208+
download (bool, optional): If True, downloads the dataset from the internet and
209209
puts it in root directory. If dataset is already downloaded, it is not
210210
downloaded again.
211211
transform (callable, optional): A function/transform that takes in an PIL image
@@ -229,11 +229,11 @@ class KMNIST(MNIST):
229229
"""`Kuzushiji-MNIST <https://github.com/rois-codh/kmnist>`_ Dataset.
230230
231231
Args:
232-
root (string): Root directory of dataset where ``KMNIST/processed/training.pt``
233-
and ``KMNIST/processed/test.pt`` exist.
234-
train (bool, optional): If True, creates dataset from ``training.pt``,
235-
otherwise from ``test.pt``.
236-
download (bool, optional): If true, downloads the dataset from the internet and
232+
root (string): Root directory of dataset where ``KMNIST/raw/train-images-idx3-ubyte``
233+
and ``KMNIST/raw/t10k-images-idx3-ubyte`` exist.
234+
train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
235+
otherwise from ``t10k-images-idx3-ubyte``.
236+
download (bool, optional): If True, downloads the dataset from the internet and
237237
puts it in root directory. If dataset is already downloaded, it is not
238238
downloaded again.
239239
transform (callable, optional): A function/transform that takes in an PIL image
@@ -257,14 +257,14 @@ class EMNIST(MNIST):
257257
"""`EMNIST <https://www.westernsydney.edu.au/bens/home/reproducible_research/emnist>`_ Dataset.
258258
259259
Args:
260-
root (string): Root directory of dataset where ``EMNIST/processed/training.pt``
261-
and ``EMNIST/processed/test.pt`` exist.
260+
root (string): Root directory of dataset where ``EMNIST/raw/train-images-idx3-ubyte``
261+
and ``EMNIST/raw/t10k-images-idx3-ubyte`` exist.
262262
split (string): The dataset has 6 different splits: ``byclass``, ``bymerge``,
263263
``balanced``, ``letters``, ``digits`` and ``mnist``. This argument specifies
264264
which one to use.
265265
train (bool, optional): If True, creates dataset from ``training.pt``,
266266
otherwise from ``test.pt``.
267-
download (bool, optional): If true, downloads the dataset from the internet and
267+
download (bool, optional): If True, downloads the dataset from the internet and
268268
puts it in root directory. If dataset is already downloaded, it is not
269269
downloaded again.
270270
transform (callable, optional): A function/transform that takes in an PIL image
@@ -341,8 +341,8 @@ class QMNIST(MNIST):
341341
"""`QMNIST <https://github.com/facebookresearch/qmnist>`_ Dataset.
342342
343343
Args:
344-
root (string): Root directory of dataset whose ``processed``
345-
subdir contains torch binary files with the datasets.
344+
root (string): Root directory of dataset whose ``raw``
345+
subdir contains binary files of the datasets.
346346
what (string,optional): Can be 'train', 'test', 'test10k',
347347
'test50k', or 'nist' for respectively the mnist compatible
348348
training set, the 60k qmnist testing set, the 10k qmnist
@@ -354,7 +354,7 @@ class QMNIST(MNIST):
354354
for each example is class number (for compatibility with
355355
the MNIST dataloader) or a torch vector containing the
356356
full qmnist information. Default=True.
357-
download (bool, optional): If true, downloads the dataset from
357+
download (bool, optional): If True, downloads the dataset from
358358
the internet and puts it in root directory. If dataset is
359359
already downloaded, it is not downloaded again.
360360
transform (callable, optional): A function/transform that

0 commit comments

Comments
 (0)