@@ -25,18 +25,18 @@ class MNIST(VisionDataset):
2525 and ``MNIST/raw/t10k-images-idx3-ubyte`` exist.
2626 train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
2727 otherwise from ``t10k-images-idx3-ubyte``.
28- download (bool, optional): If True, downloads the dataset from the internet and
29- puts it in root directory. If dataset is already downloaded, it is not
30- downloaded again.
3128 transform (callable, optional): A function/transform that takes in a PIL image
3229 and returns a transformed version. E.g, ``transforms.RandomCrop``
3330 target_transform (callable, optional): A function/transform that takes in the
3431 target and transforms it.
32+ download (bool, optional): If True, downloads the dataset from the internet and
33+ puts it in root directory. If dataset is already downloaded, it is not
34+ downloaded again.
3535 """
3636
3737 mirrors = [
38- "http://yann.lecun.com/exdb/mnist/" ,
3938 "https://ossci-datasets.s3.amazonaws.com/mnist/" ,
39+ "http://yann.lecun.com/exdb/mnist/" ,
4040 ]
4141
4242 resources = [
@@ -209,13 +209,13 @@ class FashionMNIST(MNIST):
209209 and ``FashionMNIST/raw/t10k-images-idx3-ubyte`` exist.
210210 train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
211211 otherwise from ``t10k-images-idx3-ubyte``.
212- download (bool, optional): If True, downloads the dataset from the internet and
213- puts it in root directory. If dataset is already downloaded, it is not
214- downloaded again.
215212 transform (callable, optional): A function/transform that takes in a PIL image
216213 and returns a transformed version. E.g, ``transforms.RandomCrop``
217214 target_transform (callable, optional): A function/transform that takes in the
218215 target and transforms it.
216+ download (bool, optional): If True, downloads the dataset from the internet and
217+ puts it in root directory. If dataset is already downloaded, it is not
218+ downloaded again.
219219 """
220220
221221 mirrors = ["http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/" ]
@@ -237,13 +237,13 @@ class KMNIST(MNIST):
237237 and ``KMNIST/raw/t10k-images-idx3-ubyte`` exist.
238238 train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``,
239239 otherwise from ``t10k-images-idx3-ubyte``.
240- download (bool, optional): If True, downloads the dataset from the internet and
241- puts it in root directory. If dataset is already downloaded, it is not
242- downloaded again.
243240 transform (callable, optional): A function/transform that takes in a PIL image
244241 and returns a transformed version. E.g, ``transforms.RandomCrop``
245242 target_transform (callable, optional): A function/transform that takes in the
246243 target and transforms it.
244+ download (bool, optional): If True, downloads the dataset from the internet and
245+ puts it in root directory. If dataset is already downloaded, it is not
246+ downloaded again.
247247 """
248248
249249 mirrors = ["http://codh.rois.ac.jp/kmnist/dataset/kmnist/" ]
@@ -358,6 +358,9 @@ class QMNIST(MNIST):
358358 for each example is class number (for compatibility with
359359 the MNIST dataloader) or a torch vector containing the
360360 full qmnist information. Default=True.
361+ train (bool,optional,compatibility): When argument 'what' is
362+ not specified, this boolean decides whether to load the
363+ training set or the testing set. Default: True.
361364 download (bool, optional): If True, downloads the dataset from
362365 the internet and puts it in root directory. If dataset is
363366 already downloaded, it is not downloaded again.
@@ -366,9 +369,6 @@ class QMNIST(MNIST):
366369 version. E.g, ``transforms.RandomCrop``
367370 target_transform (callable, optional): A function/transform
368371 that takes in the target and transforms it.
369- train (bool,optional,compatibility): When argument 'what' is
370- not specified, this boolean decides whether to load the
371- training set or the testing set. Default: True.
372372 """
373373
374374 subsets = {"train" : "train" , "test" : "test" , "test10k" : "test" , "test50k" : "test" , "nist" : "nist" }
@@ -514,7 +514,7 @@ def read_sn3_pascalvincent_tensor(path: str, strict: bool = True) -> torch.Tenso
514514 data = f .read ()
515515
516516 # parse
517- if sys .byteorder == "little" :
517+ if sys .byteorder == "little" or sys . platform == "aix" :
518518 magic = get_int (data [0 :4 ])
519519 nd = magic % 256
520520 ty = magic // 256
@@ -527,7 +527,7 @@ def read_sn3_pascalvincent_tensor(path: str, strict: bool = True) -> torch.Tenso
527527 torch_type = SN3_PASCALVINCENT_TYPEMAP [ty ]
528528 s = [get_int (data [4 * (i + 1 ) : 4 * (i + 2 )]) for i in range (nd )]
529529
530- if sys .byteorder == "big" :
530+ if sys .byteorder == "big" and not sys . platform == "aix" :
531531 for i in range (len (s )):
532532 s [i ] = int .from_bytes (s [i ].to_bytes (4 , byteorder = "little" ), byteorder = "big" , signed = False )
533533
0 commit comments