Unverified Commit 4628481d authored by Guo's avatar Guo Committed by GitHub
Browse files

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: default avatarPhilip Meier <github.pmeier@posteo.de>
parent e08c9e31
...@@ -19,11 +19,11 @@ class MNIST(VisionDataset): ...@@ -19,11 +19,11 @@ class MNIST(VisionDataset):
"""`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset. """`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset.
Args: Args:
root (string): Root directory of dataset where ``MNIST/processed/training.pt`` root (string): Root directory of dataset where ``MNIST/raw/train-images-idx3-ubyte``
and ``MNIST/processed/test.pt`` exist. and ``MNIST/raw/t10k-images-idx3-ubyte`` exist.
train (bool, optional): If True, creates dataset from ``training.pt``, train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
otherwise from ``test.pt``. otherwise from ``t10k-images-idx3-ubyte``.
download (bool, optional): If true, downloads the dataset from the internet and download (bool, optional): If True, downloads the dataset from the internet and
puts it in root directory. If dataset is already downloaded, it is not puts it in root directory. If dataset is already downloaded, it is not
downloaded again. downloaded again.
transform (callable, optional): A function/transform that takes in an PIL image transform (callable, optional): A function/transform that takes in an PIL image
...@@ -201,11 +201,11 @@ class FashionMNIST(MNIST): ...@@ -201,11 +201,11 @@ class FashionMNIST(MNIST):
"""`Fashion-MNIST <https://github.com/zalandoresearch/fashion-mnist>`_ Dataset. """`Fashion-MNIST <https://github.com/zalandoresearch/fashion-mnist>`_ Dataset.
Args: Args:
root (string): Root directory of dataset where ``FashionMNIST/processed/training.pt`` root (string): Root directory of dataset where ``FashionMNIST/raw/train-images-idx3-ubyte``
and ``FashionMNIST/processed/test.pt`` exist. and ``FashionMNIST/raw/t10k-images-idx3-ubyte`` exist.
train (bool, optional): If True, creates dataset from ``training.pt``, train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
otherwise from ``test.pt``. otherwise from ``t10k-images-idx3-ubyte``.
download (bool, optional): If true, downloads the dataset from the internet and download (bool, optional): If True, downloads the dataset from the internet and
puts it in root directory. If dataset is already downloaded, it is not puts it in root directory. If dataset is already downloaded, it is not
downloaded again. downloaded again.
transform (callable, optional): A function/transform that takes in an PIL image transform (callable, optional): A function/transform that takes in an PIL image
...@@ -229,11 +229,11 @@ class KMNIST(MNIST): ...@@ -229,11 +229,11 @@ class KMNIST(MNIST):
"""`Kuzushiji-MNIST <https://github.com/rois-codh/kmnist>`_ Dataset. """`Kuzushiji-MNIST <https://github.com/rois-codh/kmnist>`_ Dataset.
Args: Args:
root (string): Root directory of dataset where ``KMNIST/processed/training.pt`` root (string): Root directory of dataset where ``KMNIST/raw/train-images-idx3-ubyte``
and ``KMNIST/processed/test.pt`` exist. and ``KMNIST/raw/t10k-images-idx3-ubyte`` exist.
train (bool, optional): If True, creates dataset from ``training.pt``, train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
otherwise from ``test.pt``. otherwise from ``t10k-images-idx3-ubyte``.
download (bool, optional): If true, downloads the dataset from the internet and download (bool, optional): If True, downloads the dataset from the internet and
puts it in root directory. If dataset is already downloaded, it is not puts it in root directory. If dataset is already downloaded, it is not
downloaded again. downloaded again.
transform (callable, optional): A function/transform that takes in an PIL image transform (callable, optional): A function/transform that takes in an PIL image
...@@ -257,14 +257,14 @@ class EMNIST(MNIST): ...@@ -257,14 +257,14 @@ class EMNIST(MNIST):
"""`EMNIST <https://www.westernsydney.edu.au/bens/home/reproducible_research/emnist>`_ Dataset. """`EMNIST <https://www.westernsydney.edu.au/bens/home/reproducible_research/emnist>`_ Dataset.
Args: Args:
root (string): Root directory of dataset where ``EMNIST/processed/training.pt`` root (string): Root directory of dataset where ``EMNIST/raw/train-images-idx3-ubyte``
and ``EMNIST/processed/test.pt`` exist. and ``EMNIST/raw/t10k-images-idx3-ubyte`` exist.
split (string): The dataset has 6 different splits: ``byclass``, ``bymerge``, split (string): The dataset has 6 different splits: ``byclass``, ``bymerge``,
``balanced``, ``letters``, ``digits`` and ``mnist``. This argument specifies ``balanced``, ``letters``, ``digits`` and ``mnist``. This argument specifies
which one to use. which one to use.
train (bool, optional): If True, creates dataset from ``training.pt``, train (bool, optional): If True, creates dataset from ``training.pt``,
otherwise from ``test.pt``. otherwise from ``test.pt``.
download (bool, optional): If true, downloads the dataset from the internet and download (bool, optional): If True, downloads the dataset from the internet and
puts it in root directory. If dataset is already downloaded, it is not puts it in root directory. If dataset is already downloaded, it is not
downloaded again. downloaded again.
transform (callable, optional): A function/transform that takes in an PIL image transform (callable, optional): A function/transform that takes in an PIL image
...@@ -341,8 +341,8 @@ class QMNIST(MNIST): ...@@ -341,8 +341,8 @@ class QMNIST(MNIST):
"""`QMNIST <https://github.com/facebookresearch/qmnist>`_ Dataset. """`QMNIST <https://github.com/facebookresearch/qmnist>`_ Dataset.
Args: Args:
root (string): Root directory of dataset whose ``processed`` root (string): Root directory of dataset whose ``raw``
subdir contains torch binary files with the datasets. subdir contains binary files of the datasets.
what (string,optional): Can be 'train', 'test', 'test10k', what (string,optional): Can be 'train', 'test', 'test10k',
'test50k', or 'nist' for respectively the mnist compatible 'test50k', or 'nist' for respectively the mnist compatible
training set, the 60k qmnist testing set, the 10k qmnist training set, the 60k qmnist testing set, the 10k qmnist
...@@ -354,7 +354,7 @@ class QMNIST(MNIST): ...@@ -354,7 +354,7 @@ class QMNIST(MNIST):
for each example is class number (for compatibility with for each example is class number (for compatibility with
the MNIST dataloader) or a torch vector containing the the MNIST dataloader) or a torch vector containing the
full qmnist information. Default=True. full qmnist information. Default=True.
download (bool, optional): If true, downloads the dataset from download (bool, optional): If True, downloads the dataset from
the internet and puts it in root directory. If dataset is the internet and puts it in root directory. If dataset is
already downloaded, it is not downloaded again. already downloaded, it is not downloaded again.
transform (callable, optional): A function/transform that transform (callable, optional): A function/transform that
......
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