IterableTorchMnistDataset#

class IterableTorchMnistDataset[source]#

Iterable MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset.

Parameters
batch_size: int, default=64

Batch size to use

train: bool, default: true

If True, creates dataset from training.pt, otherwise from test.pt.

transform: t.Optional[t.Callable], default: None

A function/transform that takes in an PIL image and returns a transformed version. E.g, transforms.RandomCrop

n_samples: int, default: None

Number of samples to use. If None, use all samples.

__init__(batch_size: int = 64, train: bool = True, transform: Optional[Callable] = None, n_samples: Optional[int] = None) None[source]#
__new__(*args, **kwargs)#

Attributes

IterableTorchMnistDataset.functions

IterableTorchMnistDataset.mirrors

IterableTorchMnistDataset.raw_folder

Return the path to the raw data folder.

IterableTorchMnistDataset.reduce_ex_hook

IterableTorchMnistDataset.resources

IterableTorchMnistDataset.type

Methods

IterableTorchMnistDataset.download()

Download the MNIST data if it doesn't exist already.

IterableTorchMnistDataset.register_datapipe_as_function(...)

IterableTorchMnistDataset.register_function(...)

IterableTorchMnistDataset.reinforce_type(...)

Reinforce the type for DataPipe instance.

IterableTorchMnistDataset.set_reduce_ex_hook(hook_fn)