dataeval.utils.data.datasets.MNIST¶
-
class dataeval.utils.data.datasets.MNIST(root, download=
False, image_set='train', corruption=None, transforms=None, verbose=False)¶ MNIST Dataset and Corruptions.
There are 15 different styles of corruptions. This class downloads differently depending on if you need just the original dataset or if you need corruptions. If you need both a corrupt version and the original version then choose corruption=”identity” as this downloads all of the corrupt datasets and provides the original as identity. If you just need the original, then using corruption=None will download only the original dataset to save time and space.
- Parameters:¶
- root : str or pathlib.Path¶
Root directory of dataset where the
mnistfolder exists.- download : bool, default False¶
If True, downloads the dataset from the internet and puts it in root directory. Class checks to see if data is already downloaded to ensure it does not create a duplicate download.
- image_set : "train", "test" or "base", default "train"¶
If “base”, returns all of the data to allow the user to create their own splits.
- verbose : bool, default False¶
If True, outputs print statements.
- corruption : CorruptionStringMap | None¶
- transforms : dataeval.utils.data._types.Transform[numpy.typing.NDArray[Any]] | Sequence[dataeval.utils.data._types.Transform[numpy.typing.NDArray[Any]]] | None¶
- index2label¶
Dictionary which translates from class integers to the associated class strings.
- Type:¶
dict