peal.data.custom_datasets.MnistDataset¶
- class peal.data.custom_datasets.MnistDataset[source]¶
Bases:
Image2ClassDatasetPlain MNIST in the ImageFolder layout, without any confounder.
On first use the torchvision MNIST train and test splits are downloaded to
<dataset_path>_train_rawand<dataset_path>_val_rawand written out as PNGs under<dataset_path>/imgs/<digit>/<running index>.png, so thatImage2ClassDatasetcan take over and split them byconfig.split.- Parameters:
config (
DataConfig) – Usesdataset_path; the remaining fields are interpreted byImage2ClassDataset.**kwargs – Forwarded to
Image2ClassDataset(mode,transform, …).
Methods
Attributes
- __init__(config, **kwargs)[source]¶
Write the MNIST PNG tree if
config.dataset_pathdoes not exist yet.- Parameters:
config (DataConfig)